Jump to content

Output upload URL to admin


moose1
 Share

Recommended Posts

Hello,

ProcessWire novice here trying to help document managing and linking a bit easier for our site editors.

When our editors upload documents to a document container page in the ProcessWire editor and need to grab the URL of any of those documents, they normally just view that document page in a browser and copy the link it from there with a right-click:

 Dq5Zvk8.png

What I'd like to do is also display these URLs within the editor so people can grab the full URL from there without having to look at it in a browser. From what I can tell, ProcessWire doesn't have an admin field that would allow me to display the results of something like this when a file has been uploaded.

echo "<a href=$file->url'>$file->name</a> 

 Should I look for a module for something like? Or is there a way to do this already?

Thanks in advance for any suggestions.

Russ

Link to comment
Share on other sites

Just click on the filename in the backend. It's a link to the file / image.

This is normally what I'd tell people to do, but we created a function that takes the file upload path and creates a base URL for that document that ends in /download/ instead of the actual file name. This way, once someone uploads a new version of that file, they don't have to hunt down the links to it to update the file extension. For example, this:

http://mysite.com/site/assets/files/20008/idf_v2.pdf

Gets changed to this:

http://mysite.com/site/assets/files/identity-finder/download/

The /download/ URL is available for people to copy from the browser, but I can't figure out how to display this link in the editor, which would save a step. 

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...