WordPress.org

Ready to get started?Download WordPress

Forums

Upload file directory link invalid (9 posts)

  1. BigBri
    Member
    Posted 7 years ago #

    I run wordpress in a directory other than the root. I have it configured with the urls in options just like the codex says to. Everything works beautifully except for links that are created when I drag and drop uploaded files and/or pictures into a post. The link that is created is as if wordpress were installed in the root directory.

    Specifics:
    I am running wordpress 2.0.4 on powweb.
    In general options, under wordpress address I have:
    http://emclub.bigbri.net/wordpress
    Under Blog address I have:
    http://emclub.bigbri.net
    Links to uploaded files do not include the "/wordpress" directory in them. (e.g. http://emclub.bigbri.net/wp-content/uploads/2006/09/minutes20060825.doc)

  2. spencerp
    Member
    Posted 7 years ago #

    Maybe I shouldn't have deleted what I originally wrote, but..going to repost this again.. not sure if it's right or not though..

    In the blog's control panel => Options => Miscellaneous
    For the uploads path, make like this maybe:
    wordpress/wp-content/uploads

    Then, click the Update Options button..?

    I'm *not sure*.. though.. =/ Depends also, if you have a "special setup" for your blog itself. =/

    spencerp

    I'm not having the "best" night, tonight.. so..please be gentle k. =P

  3. toughIQ
    Member
    Posted 7 years ago #

    i encountered the same problem. when i upload an image and use it within the editor, it works fine.

    but if i upload a pdf file for example, then use _link to file_ then the link is not correct.

    accourding to my settings the files are uploaded to wp-content/uploads and then stored in monthly directories.

    any ideas why its ok for images, but broken with _normal_ links?

    reg, chris

  4. Wpnoob
    Member
    Posted 7 years ago #

    toughIQ - same issue here with PDF files!

    my upload folder is /wp-content/uploads like it is supposed to be.

    Uploading an image file and then using "Send to Editor" and "Link to file" works just fine.

    Uploading a PDF file and using "Send to Editor" and "Link to file" it assigns the link /wp-admin/ instead of /wp-content/uploads

    It DOES put the PDF file in the right place - the /wp-content/uploads folder - but it's just the link that thhe editor create to the file that gives it the wrong path.

    So for example, if I upload "test.pdf" and "test.jpg" - both files go correctly into the uploads folder. But when I "Send to editor / link to file" it makes the path /wp-content/uploads/test.jpg for the JPG file, and /wp-admin/test.pdf for the PDF file.

    I've been sitting here for almost an hour pulling out my hair trying to figure out what's up! You have no idea how relieved I was to see your post and at least know that it's not just me.

    Now, trying to figure out why WP upload / link to file feature does not like PDF... well... that's beyond me...

  5. Gary
    Member
    Posted 7 years ago #

    I am having the same problem! My wordpress is in root directory and if I attached word document, it create a invalid link like domain.com/document.doc when it should have been /wp-content/uploads/document.doc.

    I'm beginning to lose the faith in WordPress!

  6. Gary
    Member
    Posted 7 years ago #

    Well, found a solution! Just add / to wp-content/uploads in Misc option (e.g. /wp-content/uploads).

    The problem is fixed!

  7. ryan77
    Member
    Posted 7 years ago #

    That does not fix the problem.

    If you download and install the Anarchy Media Player plugin (http://an-archos.com/anarchy-media-player), that will fix the issue.

    I had the player installed and was having no problem with the streaming audio and video files or links to PDF and XLS files, but then uninstalled it and started having problems.

    Re-installed it and it works like a dream.

    Someone may want to confirm, but I think this can be marked as resolved.

  8. mgoldblatt
    Member
    Posted 7 years ago #

    Has anybody found a good solution to this? I am having the same problem as the original poster - basically my blog is in a subdir (i.e. http://my.server.com/myblog) and when I upload a file, the file ends up in the right place, but when I link to it in a post, it leaves the "/myblog" part of the path out, leaving me with invalid links. I'm mostly interested in posting pdf, word and excel documents, so if there's something weird or unique about linking to those, please let me know.
    For what it's worth, adding a "/" to the Uploads Path in Options => Miscellaneous doesn't help at all.
    Oh, and if it matters, I'm using v. 2.0.5 of WP on a windows webserver (iis 5).
    Any help that can be offered would be swell.
    thanks.

  9. ak-w
    Member
    Posted 7 years ago #

    Using a windows hosting I couldn't uploads file

    I've changed the wp-config.php in this way and now the upload works. :P

    define('UPLOADS', 'location\of\public\directory\\');
    define('ABSPATH', dirname(__FILE__).'\\');

    but still got to see if everything work correctly

    sorry for spaghetti english, bye luca

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.