The MU forums have moved to

How to use image upload? Inline-uploading.php (17 posts)

  1. Cruz
    Posted 17 years ago #

    Hello experts,

    I've searched the forum but it appears that what I'm asking is too basic that no one has asked it before.

    I'm struggling with uploading files. I believe by default MU uses inline-uploading.php. I can successfully upload the picture but I cannot figure out how to link the picture to my post.

    Do you have suggestions to another plugin/script for MU that may be very easy and clear for the end user to use? (Like upload.php)

    Thank you

  2. andrea_r
    Posted 17 years ago #

    Click on the picture in the upload area. There's a "browse" tab there. A menu will pop up right over the picture itself. You can even click and drag the picture into the post.

    And I'm not sure if something like uplaod.php would be more clear for users. You're always going to get someone who needs a clear and sometimes BOLD link. :D The inline-uploading.php is called in an I-frame withing the post area - it isn't called anywhere outside that, and if you tried, would result in an error anyway.

  3. Cruz
    Posted 17 years ago #

    Thank you Andrea for the kind reply. When I click on "browse all", I cannot see the pictures. I only see the name of the picture, not the picture itself. By clicking on the name, I get the following list:

    "Using Thumbnail
    Not linked
    Send to editor
    Close options"

    I can click the options and change preference, but it doesn't do anything. If I drag the text into the post, it doesn't show the right img link to the picture. The img link is linked to "javascript:void()"

    The uploaded file itself is 15K. The file type jpg is accepted, and I also made sure that users are allowed to upload 15MB. What else could result in not working properly?

  4. andrea_r
    Posted 17 years ago #

    Hmmm... all i can think of is maybe there isn't an image handling thingy on the server, like ImageMagik or something. I'm not sure how the thumbnails are auto-generated.
    Lemme go dig stuff up.

  5. andrea_r
    Posted 17 years ago #

    okay, let's just run down some things:
    The folder where images go on the server has the right permissions?
    Can you view the picture at its URL, outside of WP/MU?
    If you click "send to editor", what does it do? Does it stick it in the post?

  6. drmike
    Posted 17 years ago #

    Is a thumbnail being generated and placed along side the original image with the subdirectory?

  7. Cruz
    Posted 17 years ago #

    Thank you Andrea_r and Drmike for the kind replies. It's great seeing both of you active on this forum!

    1. I right click on the text (picture name) and copy the URL, it directs to USER_url/files/2006/09/logo.thumbnail.jpg which gives me a not found page.

    2. When I click on "send to editor", the name of the picture shows up in the post. It links to the URL cited in 1.

    3. I am not positive which folder is used to store upload images as I cannot find the "file" folder. What is the right permission to use?

    Thank you,

  8. kahless
    Posted 17 years ago #

    The file folder is really a rewrite to a sub directory of the blogs.dir in wp-content. I am not sure if blogs.dir needs to be 777 for the permissions or if you can get by with 775 or 664. If the webserver user owns the wpmu install then I don't think it matters what the group and other permissions are.

  9. drmike
    Posted 17 years ago #

    Mine is set to 777.

    The folder you would be looking in is {wpmu's root}/wp-content/blogs.dir/$blog_id/$year/$month/

    where $blog_id is the ID number of the blog (Look at Dashboard -> Site Admin -> Blogs to get this number), $year is the year and $month is the month by number.

  10. Cruz
    Posted 17 years ago #

    Here are some test results:

    1. I can view the pictures at the following type of URL: wp-inst/wp-content/blogs.dir/31/files/2006/09/virus-system-integrity-scan.thumbnail.jpg
    Both original and thumbnail viewing are fine.

    2. I cannot view the pictures at the following types of URL: files/2006/09/virus-system-integrity-scan.thumbnail.jpg

    3. I change the permission to 777 and wrote a test post with "send to editor." The post shows the name of the picture.

    4. If I drag the name of the picture to the post, the link "Using original" is listed in the post. The link links to "URL/void()"

    Can we conclude that it may be rewrite issues?

  11. Cruz
    Posted 17 years ago #

    Are there problems with the following rewrite rules that may have caused the problem?

    1. RewriteRule ^([_0-9a-zA-Z-]+)/files/(.*) /wp-inst/wp-content/blogs.php?file=$1 [L]

    2. RewriteRule ^([_0-9a-zA-Z-]+)/wp-content/blogs/(.*)/files/(.*) /wp-inst/wp-content/blogs.php?file=$3 [L]

  12. andrea_r
    Posted 17 years ago #

    Are you using an older build? That's what those snippets look like.

    I have this, from RC4:

    #uploaded files
    RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]

  13. drmike
    Posted 17 years ago #

    If you can view them with the actual URL of the image instead of the rewritten one, something is wrong with your htaccess file than. I can not view image files directly on my site. I can only do it with the rewritten URL that wordpress gives you.

  14. Cruz
    Posted 17 years ago #

    Yes, I believe I am using the older build.

    I removed

    RewriteRule ^([_0-9a-zA-Z-]+)/files/(.*) /wp-inst/wp-content/blogs.php?file=$1 [L] and

    RewriteRule ^([_0-9a-zA-Z-]+)/wp-content/blogs/(.*)/files/(.*) /wp-inst/wp-content/blogs.php?file=$3 [L]

    then replace those with the one provided by Andrea_r:

    "RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]"

    Doesn't solve the issue. Maybe should try upgrading..

  15. cdevroe
    Posted 17 years ago #

    Cruz: If you haven't yet updated your WPMU install you can use the following for your .htaccess....

    RewriteRule ^files/(.*) /wp-inst/wp-content/blogs.php?file=$1 [L]

    However, I am now getting the "You cannot upload files of that type." error message with my install, and I have not yet found out why.

  16. pumpkinslayer
    Posted 17 years ago #

    This is not the first time someone has had this problem.

    When people upgrade their site ie. don't install from scratch, but just upload the newer files, they actually need to adjust the htaccess.inst to get the latest .htaccess, which I think many people don't do.

    So, please always compare your .htaccess to the htaccess.inst that you get with the wpmu package.


    1. The direct link always works ie$blog/files/$year/$month/filename,
    2.$year/$month/filename doesn't work.

  17. pixline
    Posted 17 years ago #

    Just wondering: there is a hook or some way to bypass inline-uploading.php completely with a plugin, displaying another interface to upload and deal with attachments?

    We are moving from a self-developed CMS to wordpress, looking to convert some advanced attachments functions into wordpress plugin, but we have some problem in customizing this, but we can't find in the documentation something inspiring us...

About this Topic