21301 Posts in 5735 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » FIXED Upload Problems: image.JPG fails - image.jpg works...
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1285 Views |
-
FIXED Upload Problems: image.JPG fails - image.jpg works...

1 February 2011 at 8:40pm
Hello,
I notice this bug was reported ages ago (http://silverstripe.org/archive/show/2466), but i'm having the same issue.
When I upload jpeg images, and the extension is in uppercase, the image cannot be viewed (403 Forbidden server error)
Did anyone ever find a fix for this?
If i rename the extension of the uploaded file, it works, so i'm thinking it must be a .htaccess / redirect problem or something - not an upload problem?example
http://silverstripe.northernlightsdesign.co.uk/assets/Uploads/bike2.JPG
http://silverstripe.northernlightsdesign.co.uk/assets/Uploads/bike.jpg -
Re: FIXED Upload Problems: image.JPG fails - image.jpg works...

1 February 2011 at 8:45pm
Ok, just after I posted this, i took another look at the folder, and noticed another .htaccess file in the 'assets' folder
In here, it gives a list of permissible files - so I just had to add JPG into the list.
<FilesMatch "\.(JPG|html|htm|xhtml|js|css|bmp|png|gif|jpg|jpeg|ico|pcx|tif|tiff|au|mid|midi|mpa|mp3|ogg|m4a|ra|wma|wav|cda|avi|mpg|mpeg|asf|wmv|m4v|mov|mkv|mp4|swf|flv|ram|rm|doc|docx|txt|rtf|xls|xlsx|pages|ppt|pptx|pps|csv|cab|arj|tar|zip|zipx|sit|sitx|gz|tgz|bz2|ace|arc|pkg|dmg|hqx|jar|xml|pdf)$">
Allow from all
</FilesMatch>JPG files are pretty common, so hopefully this fix can help others!
-
Re: FIXED Upload Problems: image.JPG fails - image.jpg works...

3 February 2011 at 9:36am
Bless you Jon,
you just saved the day over here.
This really should be rolled in, or handled differently altogether. Maybe automatically lowercasing file extensions extension on upload?
Most of the clients i work for haven't even seen a file extension in their lives.
Thanks a bunch again,
Andi -
Re: FIXED Upload Problems: image.JPG fails - image.jpg works...

18 February 2011 at 11:48am
Legend Thanks!
-
Re: FIXED Upload Problems: image.JPG fails - image.jpg works...

31 May 2011 at 4:44am
Thanks for sharing your answer
-
Re: FIXED Upload Problems: image.JPG fails - image.jpg works...

1 June 2011 at 11:48am
Thanks for sharing.
It would be good if raise a ticket for silverstripe core development team.
Maybe it worthwhile putting the code in their ss package.
| 1285 Views | ||
|
Page:
1
|
Go to Top |





