Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload of this filetype (.jpg) is not allowed! #11853

Closed
gadgetto opened this issue Jul 30, 2014 · 24 comments
Closed

Upload of this filetype (.jpg) is not allowed! #11853

gadgetto opened this issue Jul 30, 2014 · 24 comments

Comments

@gadgetto
Copy link

Since 2.3 (I think) its not possible to upload image files to the assets directory without adding the .jpg,.png,.gif to the Uploadable File Types system setting.

The �Uploadable Image Types setting seems to be ignored.

screenshot 2014-07-30 16 20 48

screenshot 2014-07-30 16 21 33

@pixelchutes
Copy link
Contributor

Are you working on a fresh install, or an upgrade (from 2.2)?

On a fresh local install, I show:

upload_files // txt,html,htm,xml,js,css,zip,gz,rar,z,tgz,tar,htaccess,mp3,mp4,aac,wav,au,wmv,avi,mpg,mpeg,pdf,doc,docx,xls,xlsx,ppt,pptx,jpg,jpeg,png,gif,psd,ico,bmp,odt,ods,odp,odb,odg,odf
upload_images // jpg,jpeg,png,gif,psd,ico,bmp

I am also able to upload a jpg into /assets/images/ (once created) without issue on 2.3.1.

Perhaps upload_files was somehow changed (or not kept in sync) along the way?

@kmcarter
Copy link

I am experiencing this as well on a client's existing site. I can confirm that it started happening just after upgrading to 2.3.1.

Our upload_files never had all the image types like your fresh install does, but once adding them, uploads work again. The upload_images setting seems redundant at this point. Perhaps the upgrade process should append the upload_images value to the upload_files value?

@crimsonpixel
Copy link

I upgraded a site today from 2.2.6 -> 2.2.10 -> 2.2.14 -> 2.3.1 and now have this exact same problem. Nothing in error logs. Creating the images folder in the assets folder doesn't seem to resolve problem.

Thought it was a permission issue with my client, but even with full permission I'm unable to upload images or files getting same error message as @gadgetto

@thomasd
Copy link
Contributor

thomasd commented Aug 19, 2014

hey guys.
I wrote the code you are talking about. I thought it was the right behaviour that all uploadable file types must be in the upload_files setting.
But thinking about it...what is the upload_images setting good for then?
Hmm...???
I think we should decide what is the correct behaviour for this:

  1. Taking upload_files as the only source for permitted file types
  2. Merge upload_files and upload_images as source for permitted file types

I'm happy with either way and will send in a pull request if option 2 is our choice.

So long...

@crimsonpixel
Copy link

Not sure that is the only problem going on. I've upgraded several sites and I don't appear to have this upload_files problem on all of them.

On the one in which I am having a problem I did go through the versions as listed in previous post to ensure there were no issues. Unforuntately seemed to hit this problem going from 2.2.14 to 2.3.1. I've cleared cache and flushed permissions, but the problem persists.

@DonQuicky
Copy link

So I guess my suggested fix in my push request ( thomasd/MultiUploadDialog#11 ) can be still relevant?

@crimsonpixel
Copy link

I've downloaded and installed MultiUploadDialog extra and this has resolved the problem - not a fix as such but at least my client can now upload images again.... :)

@soydemadrid
Copy link

Hi I also have this issue. I've installed MultiUploadDialog extra too, but it's made no difference. Does anyone know a fix for this yet please?

@gadgetto
Copy link
Author

@soydemadrid you currently need to add the desired image extensions (.jpg,.gif,.png,...) to the upload_files MODX System Setting

@soydemadrid
Copy link

Thanks, I've already added them to upload_media and upload_images! Adding them now to upload_files works. Thank you

@OptimusCrime
Copy link
Contributor

Close ticket

@gadgetto
Copy link
Author

Is this fixed now?

@ukwiz
Copy link

ukwiz commented Jan 20, 2015

Not fixed as of 20/01/2015

@OptimusCrime
Copy link
Contributor

Worked fine for me @ukwiz

@ukwiz
Copy link

ukwiz commented Jan 20, 2015

I am using the Installatron version of modx 2.3.1

@adamwintle
Copy link

I just found this, and as @gadgetto mentioned, I had to input the image extensions (.jpg,.gif,.png,...) to the upload_files; so maybe this bug is still present?

@Lefthandmedia
Copy link
Contributor

I'm also still seeing this in 2.3.5pl.
Imo it's illogical and comes across as sloppy
@thomasd i vote for option 2

@troseman
Copy link

troseman commented Nov 29, 2016

Since this is still a prominent page in google for this issue I found that I had to go to Media Sources, edit File System, and Save and then image uploads worked again. This was after a recent upgrade to 2.5.1. Also note that the Uploadable Image Types and File Types do not have dots before the extensions.

@dennis-f
Copy link

dennis-f commented Apr 18, 2017

I recently updated my MODx from 2.2.14 up to 2.5.6. Installed all the minor Versions incremental, and still have this bug. (All system settings and user rights are set correctly)

@BobRay
Copy link
Contributor

BobRay commented Jun 20, 2017

This is hitting me too in 2.5.7. I have jpg (with no dot) listed in both upload_files and upload_images, but I'm still receiving the error message saying that .jpg files are not allowed after selecting the files.

@Jako
Copy link
Collaborator

Jako commented Jun 20, 2017

@BobRay Maybe the media source is restricted.

The checks for allowed file extensions are initialized at different moments. The file tree seems to have a global restriction on base of upload_files system setting, that is checked before uploading any file in the file tree. And a media source could have different restrictions, that is checked after uploading the file.

@BobRay
Copy link
Contributor

BobRay commented Jun 21, 2017

It looks like it's a problem with the images themselves. The images are captured from Amazon and won't upload even after importing them into an image editor and exporting them as .gif files. I can upload other .jpg and .gif files with no trouble. I'm curious about how MODX makes the decision not to allow the upload.

@gadgetto -- is there a chance that your files are protected in some way?

@gadgetto
Copy link
Author

@BobRay not that I know of. I tried this with different files but problem persists.

@OptimusCrime
Copy link
Contributor

Can you put the image online somewhere without cropping or deflating them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests