How to access uploaded files (attachments)?

When an upload field is used, the system stores the file into Media Library and the attachment ID into DB. That “number” is the attachment ID that can be used for using and displaying it.

Once you have that attachment ID available you can use it for everything you need. You can create a link, for example:
http://wp.example.net/?attachment_id=n, where n is the attachment ID number.

https://codex.wordpress.org/Function_Reference/get_attachment_link

Related Articles