Jump to content

Sharing file uploads between pages


dab
 Share

Recommended Posts

Hi,

When I upload an image or a pdf to a page via the Processwire admin in to an "Image" or a "File" Field the files are placed in to a directory specific to that page.

e.g. ....site/assets/files/1026/file2015.pdf

If I then want to add the same image or make a link to the same PDF from another page, the image or pdf does not seem to be available to be linked to from the "Image" or "File" field.

Is there any way to share uploads across fields (as you can with Modx).

Hope I've not missed the obvious here.

With thanks.

...I'm enjoying learning Processwire, thanks everybody!

Link to comment
Share on other sites

The file/image field is not really a field to "select" a file/image, but it's a storage field. You can select these file via the processwire api in your code or you can use the CKEditor plugin to add the link via the backend to a textarea field. What's currently not possible in the core is selecting a file/image in a field. 

Since a few days there's a community module, which does try to solve the latter part: https://processwire.com/talk/topic/10009-image-field-select-image-from-another-page/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...