Closed (won't fix)
Project:
FileField Image
Version:
6.x-1.0-beta1
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2008 at 18:45 UTC
Updated:
21 Apr 2009 at 07:31 UTC
I tried to upload jpg files but it didn't work.
Is there any other way to upload jpg files without converting it into jpeg files?
Comments
Comment #1
BrightLoudNoise commented@hyunkatie: Please provide some more detail so we can troubleshoot this.
Comment #2
jpetso commentedComment #3
imkatie1 commented@BrightLoudNoise
1. What specific error did you receive? ==> It says I can upload only jpeg, png, gif.
2. Have you permitted jpg or jpeg file extensions on your field? ==> I think for 'filefield Image'module I cannot set file extensions. They are already set(jpeg,png,gif). Am I wrong?
3.What browser are you experiencing this issue in? ==> Internet Explorer 7 !
4. Are you using the content permission module? ==> no..
Thank you for your attention.
Comment #4
jpetso commentedWhile it is true that the help text says "jpeg, png, gif", the image widget uses mimetypes for determining the type of the file (as opposed to extensions, which you can specify manually). That means even if you upload a file named blah.jpg, the mimetype for it is image/jpeg and thus recognized by the image widget.
Stupid question, but did you actually try uploading the file or did you only read the help text? If the error really occurs with the actual upload, your browser might pass a wrong mimetype for the file, which would be solved by reintroducing the dependency on the MimeDetect module that we already depended on in the 5.x versions.
Comment #5
imkatie1 commented1. I uploaded actually in IE7, it really said I cannot upload because it is not jpeg, png or gif.
Exactlly it said like below
" The selected file xxxx.jpg could not be uploaded. Uploaded files are restricted to the following categories: Images (png/jpeg/gif)."
2. I experienced another strange thing several time.
Even though I didn't change any configuration of the content type with filefield_image field, 'File widgets' setting went to 'Generic files' from 'Images(png/jpeg/gif)'.
I remember somebody uploaded an issue saying he couldn't see images after he uploaded.
He/she found that the 'File widgets' setting was in 'Generic files' later.
He said that he knew he set that as 'Images(png/jpeg/gif)'.
I think he experienced very same thing as I experienced.
It happened in IE7 also.
So if that setting goes wrong, my theme becomes so ugly... like the structure is broken.
I hate IE7. Sorry about asking you too much things.
and Thanks~
Comment #6
nyl_auster commentedHello
(sorry for my bad english) i just want to add that i experienced the same problem with IE6. No problem with FF.
Comment #7
exterminatorx commentedI'm getting the same kind of error, and here are the details of my problem. When uploaded a file via the widget, I get this error message:
The selected file picture.jpg could not be uploaded. Only files with the following extensions are allowed: .
Note that empty string in the error message about the allowed extensions.
Furthermore, this problem does not occur if I'm logged in as user=1. If I'm logged in (or others) that have a different role, they get the error message. User=1 is able to upload images just fine. I checked the permissions and everything seems in order. Perhaps I missed something?
Comment #8
adam640kb commentedI get the same error as #5 when trying to upload an image using IE7, works perfectly in FF3.
" The selected file xxxx.jpg could not be uploaded. Uploaded files are restricted to the following categories: Images (png/jpeg/gif)."
Comment #9
zzeng7712 commentedsame error here, works in FF but not IE7
Comment #10
jpetso commentedThis was a bug in filefield, and is fixed with filefield 6.x-1.0-beta3.
If it works in FF but not in IE then IE is passing the wrong mimetype. The proper fix for that would be using the mimedetect module in filefield again, but for a stop-gap measure, you might find out which mimetype IE is passing to us (hint: do a
drupal_set_message($file->filemime);in the suitability callback), then we could include it in the list of mimetypes that the FileField Image and FileField ImageCache modules support.So, if you tell me the mimetype, you can have that workaround.
Comment #11
rikvd commentedip posted the solution today here
it is been like this, since IE exists
you can solve that easily for IE7, change line 51 of filefield_image.module from
'image/jpeg', 'image/png', 'image/gif'
to
'image/jpg', 'image/jpeg', 'image/pjpeg', 'image/png', 'image/gif'
Comment #12
B_u_f_o commentedand the same do in the file filefield_imagecache.module - line 96
hey :)
Comment #13
jpetso commentedFixed, and released as final release 6.x-1.0. I hope you find peace with this release, otherwise bad luck because I'm now gone from Drupal development for at least half a year. Have fun!
Comment #14
rikvd commentedenjoy your time without drupal :)
I like your comment ;)
Comment #15
Ocyrhoé commentedYou can also add another IE non standard mimetype: image/x-png
Comment #16
jpetso commentedThis module is now phased out in favor of FileField/ImageField 6.x-3.0. All issues are "won't fix" because the module is essentially dead. Please have a look at the project page for some explanations.