Closed (fixed)
Project:
Drupal core
Version:
4.7.4
Component:
upload.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Jun 2006 at 22:16 UTC
Updated:
7 Feb 2007 at 09:46 UTC
Consider a url with a path like /drupal/files/newfile.jpg for a just-uploaded attachment that is not yet saved.
If I understand correctly, URL rewriting should make this into index.php?q=files/newfile.jpg and then upload_file_download will handle the request, making the attachment url work even though it isn't put into the files dir yet.
However, the SA_2006_006 patch added RewriteEngine off into files/.htaccess so now I just get 404 for drupal/files/newfile.jpg but index.php?q=files/newfile.jpg still works.
4.7.2 on PHP 4.4.2-1 / debian, mysql 5.0.15, apache 2.0.55
Comments
Comment #1
magico commentedAnyone else with this problem?
Comment #2
pwolanin commentedI just tried uploading a jpg file (on a linux shared host) - works fine with the .htacces file in the files directory.
Did you have the problem on the initial upload, or when editing the node with uploaded files already attached?
Comment #3
pwolanin commentedforgot to mention, however, that this is with Apache 1.3.37, not 2.0
Comment #4
mindless commentedpwolanin, this is regarding attachment preview.. click "Browse" and pick a file click the button to upload it. Then click "preview" button at the bottom. In the preview you should see a table with your uploaded attachment. Click the link here.. this link is supposed to work even though the file hasn't actually been placed in your drupal "files" directory yet (it is in a temporary location until you actually submit the node).
Once the attachment is in the "files" dir, no URL rewriting is needed. It is only the preview case where "RewriteEnginge off" causes this problem.
Comment #5
magico commentedSeems to have enough information to deserve a bug confirmation
Comment #6
cog.rusty commentedI think this has been fixed long ago in 4.7.4. There is no "RewriteEngine Off" now. Only "Options None" followed by "Options +FollowSymLinks".
http://cvs.drupal.org/viewcvs/drupal/drupal/includes/file.inc?r1=1.74.2....
Comment #7
mindless commentedyup, and the comment for that change is "Patch #86314 by dopry: made previews work", sounds like it was directly targeted at the same thing I reported here.
Comment #8
magico commentedAccording to prior comments
Comment #9
(not verified) commented