Domanda

I have been using uploadify for file uploads inside my custom wordpress themes for three years and never had any problem, but I am getting an error "response:incorrect file type" in the website I am currently working on...

I am using uploadify 2.1.4 with wordpress 3.8 to generate a file custom field. I use it together with an upload script so I can set resize and renaming options in a granular way that wouldn't be possible without it...

I have set the fileTypeExts to '.', just in case, although I had never put it before and was working fine.

I have added AddType image/jpeg .jpeg .jpg .jpe .JPG in the .htaccess in case it would be a mime type error, but I still get the same error uploading jpg, and whatever the type of file I try to upload I get the same mistake (.pdf, .jpg,.doc). I have added that in the root .htaccess and also added an .htaccess in wp-admin as I am using uploadify only in the backend.

I have set the file permission of the script to 744. I have tried other permissions but nothing worked and not sure at all the problem is permission related...

I don't know what else to try right now, any suggestion would be really appriciated!!

Thanks in advance, Gioia

È stato utile?

Soluzione

Ok, solved this. The error was not coming from the browser as I thought, it was coming from the php script I use. The problem was that for some reason the mime type of the uploaded file had a charset in it ('image/jpeg; charset=binary'), and the script didn't have this mime type with the charset in it's list of allowed types. I solved it adding the new types in the list of allowed types.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top