Cannot upload the image in infinityfree server but it works in localhost

Hi, when I try to upload the image in infinityfree server, it will show the error “Upload error: The filetype you are attempting to upload is not allowed.” But when I try to do in my localhost xampp server, it works. So can I know why I cannot upload the image in online server but can upload image in localhost? (I mean when I do in webpage upload image function, not upload the image to ftp server.)

What file type you want to upload?

The file that I allow to upload is png, jpeg and jpg.

Normally when I do in localhost, it’s ok, but when I do in online server, it has the error. I don’t know is it the file permission issue in online server or what.

Retry using filezilla and share full logs here after encountering a problem.

1 Like

You mean this one?

Yes. Is the upload successful?

I dont think is successful, since when I try to upload the image and click the button to upload the image, it show this kind of error. And I’m not sure how to check if the image is uploaded successful in filezilla log info.


I think his error is with your script, can you tell the script you are using? Can you share the url?

I’m doing in php with codeigniter framework. It suppose can works since I tested in localhost everything is ok, but when I move to live server, it shows the upload error as picture that I posted above.

What type of file are you uploading btw? Is it an .svg or .png?

I’m uploading .jpg image file.

Can you share your website’s link?

u cn try to register the parent account.

1 Like

Can you check your config? Maybe your script is blocking those image extensions?

Sorry, you mean check in config file or in mimes file?

1 Like

I checked in mimes file, it didnt block the extension of png, jpg and jpeg. Or is it the permission issue of infinityfree server?

The upload form you’re looking at is not from any system we provide, which means it’s something that’s on your website.

Which means that this cannot possibly be a server issue. PHP simply does not support setting upload file type restrictions, and while we do have some file type restrictions, those would not result in a nice, descriptive error message in your web application.

So it’s completely impossible that this is a server issue. This is not a server restriction, or a server permission thing, or anything else on the server. This is your code blocking the file types.

Unfortunately, I don’t know enough about CodeIgniter to tell exactly what the issue is. But just because I don’t know the solution doesn’t mean the problem is in the server.


Hi admin, the upload form is done by myself which is using to upload the image when users register their account. But the problem is when I test in localhost everything is ok, just when I do this at this server, it has some problem. I already checked the file type resitriction of my upload function, everything is ok, just I don’t know what the problem is. Thank you for your reply, admin.