Post by Jamie.ds » Sat Aug 23, 2014 3:37 am

Clean install of 1.5.6.4 try to upload an image onto a product and it says

"Warning: Please select a file!"

Doesn't continue or anything.

Newbie

Posts

Joined
Thu Aug 04, 2011 1:13 am

Post by Antoni4 » Mon Aug 25, 2014 12:41 am

Have you tried with different browsers? Sounds like a JavaScript issue.
Where does this error message come up? Does it come from the Image Manager?

User avatar
New member

Posts

Joined
Sat Sep 29, 2012 7:03 am

Post by Antoni4 » Thu Sep 04, 2014 1:09 am

Also make sure there are no special/foreign characters in the directory or file name. I have encountered some issues with file manager when I created a folder containing "&" character.

User avatar
New member

Posts

Joined
Sat Sep 29, 2012 7:03 am

Post by Antoni4 » Wed Sep 17, 2014 8:15 am

Okay I have come across exact issue recently.
The problem is at server level.

As strange as it might sound, the problem comes from the fact that your file size exceeds upload_max_filesize php setting.

The default value is 2MB. Even though there is a php.ini file in the admin folder with upload_max_filesize set to 999M it can still be overwritten at another level.
To check what upload_max_filesize is really set to, create a file that calls <?php phpinfo(); ?> and look for upload_max_filesize value in the list of Core settings.

By default the image manager restricts files higher then 300kb. So if you are to upload a file between 300kb and 2MB you will get a proper error message from the image manager saying that file is too big (i.e. it exceeds 300kb limit). However if you are to upload a file larger than 2MB the logic in the upload function branches away to an error "Warning: Please select a file!" and file size is never checked by the image manager to give user a proper file size error.

Perhaps the file size check should be moved outside of the "if (isset($this->request->files['image']) && $this->request->files['image']['tmp_name']) {" branch, or when the branch jumps to the else the error message should be replaced from "$json['error'] = $this->language->get('error_file');" to "$json['error'] = 'error_upload_' . $this->request->files['image']['error'];". Just to make it more clear for users that come across this issue that the problem is not with file selection.

User avatar
New member

Posts

Joined
Sat Sep 29, 2012 7:03 am
Who is online

Users browsing this forum: No registered users and 5 guests