• Searching the “uploads” tag didn’t get me an answer for this, so sorry if this is a dup of something very similar.

    I’m trying to figure out how to link to whatever I upload. I see the files and file names, but what is the direct path to link to such files? Example, image.jpg would be in uploads/2006/08/ but I can’t figure a direct link. The most intuitive linking scheme doesn’t work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The default path is wp-content/uploads. For instance, if I wanted to link to a solar panel photo I uploaded last month, the direct link would be https://jonathanwagner.net/wp-content/uploads/2006/07/solarPanel3.jpg since my WordPress installation is located in the root folder of my web directory. If your WordPress installation is in a subdirectory such as /blog then the direct link would be something like https://yoursite.com/blog/wp-content/uploads/2006/08/image.jpg

    Fortunately, there’s no need to complicate it. Assuming you’re using the built-in WP 2.x uploader, that is.

    After the upload is finished, click on the image. Just a single left click. You get a menu. Bunch of stuff you can toggle or set via that menu including the option “Send to Editor”. When sent to editor, the path and name are taken care of for you.

    Thanks, jonathanwagner. I’ve been banging my head against a wall trying to set up podcasting at our site, PittsburghNewChurch.org. I only just took over responsibility for the site, and am new to wordpress. (My experience is with Blogger, MT, and a couple of home-grown disasters.)

    Anyway, in case someone else is struggling the way I was, let me post a quick description so they can find the solution when they search the forums faster than I did.

    First, I tried ftp’ing the mp3 files up to the server, into a new dir called “audio”. No go. Hyperlinking to them produced nothing. Then I tried uploading via the wp admin screens, but it kept choking on the file sizes. After chod’ing the wp-content dir to 777 I got smaller files to work, but still 7mb files would timeout with a weird script error saying “this” script was not meant to be called directly.

    Then I found this post:

    The default path is wp-content/uploads. For instance, if I wanted to link to a solar panel photo I uploaded last month, the direct link would be jonathanwagner.net/wp-content/uploads/2006/07/solarPanel3.jpg since my WordPress installation is located in the root folder of my web directory. If your WordPress installation is in a subdirectory such as /blog then the direct link would be something like yoursite.com/blog/wp-content/uploads/2006/08/image.jpg

    Now, the weird thing is, there is no wp-content/uploads/ anywhere to be found. Manually creating it made no difference. However, prepending a “blog/” to the link to the ftp’d file did the trick thusly:

    [audio src="https://pittsburghnewchurch.org/blog/audio/blahblahblah.mp3" /]

    Of course, this doesn’t fix the problem uploading very large files via the wp interface, nor does it explain why there is no uploads/ directory, but it gets the job done with expedience.

    Of course, this doesn’t fix the problem uploading very large files via the wp interface

    Just not a good idea. Use FTP.

    nor does it explain why there is no uploads/ directory

    If you set this in Options:Misc. there’s still the issue of permissions. wp-content/ needs to be 777 for WP to create wp-content/uploads/, or you have to create it yourself (preferably through FTP).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Linking to uploads – can it be done? If so, how?’ is closed to new replies.