How to access uploaded files (attachments)?
< 1 min read
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
#1 Membership WordPress Plugin
Monetize Your Content with
Ultimate
Membership Pro
Unlimited Membership Levels
Free, trial & paid plans
30+ Seamless Integrations
WooCommerce, Elementor, Mailchimp & more
Automated Recurring Billing
Charge members automatically, every cycle