Page 1 of 1

Can't upload pictures : Warning! Please select a directory!

Posted: Fri Nov 19, 2010 12:02 am
by theemorgandorfer
Ive recently upgraded my site to 1.4.9 I believe. Now when I got to upload an image for a product, it tells me: Warning! Please select a directory! I've changed permissions to 777, still not working. Both config files say the images are going to the right directory, mysite.com/images/

Sometimes ill get a warning to upload a smaller file, sometimes ill get a warning to select a file ( which I clearly did)

Any ideas?

Thank you in advance

Re: Can't upload pictures : Warning! Please select a directo

Posted: Fri Nov 19, 2010 12:12 am
by ultraspoon
I've had this problem quite a lot whilst adding pictures, for myself, it sorts it self out on its own, after giving it a few minutes.

I found that if the pictures are above a certain file size can cause problems, I'm not sure what the limit is, something like 1mb I think.

If this problem doesn't sort itself out, you can try uploading the pictures via FTP.

Re: Can't upload pictures : Warning! Please select a directo

Posted: Fri Nov 19, 2010 8:44 am
by theemorgandorfer
Well, it doesn't really seem to be "working itself out" i've tried and tried, different files, again and again. I can easily FTP the images, but the site belongs to someone who is not computer savy and extra steps is not a good idea for them.

Re: Can't upload pictures : Warning! Please select a directo

Posted: Tue Feb 01, 2011 10:35 pm
by serbaserbiz
try this : i've experienced it myself..

download back your opencart 1.4.9.1..
recheck either all files are there or have some file is missing..
(try look at IMAGE file)
then just upload it back..

i hope this one can help..(sorry if my english bad :)

Re: Can't upload pictures : Warning! Please select a directo

Posted: Wed Apr 13, 2011 11:52 am
by Morningshadow
I am having the same problems. A description is found HERE. I am hoping that if we link the two threads together, we might be able to find a few possible answers, at least.

Re: Can't upload pictures : Warning! Please select a directo

Posted: Mon Sep 05, 2011 4:45 pm
by eb_dev
Thought I would post a reply to this as had the same issue and resolved it, in the /admin/controller/common/ folder there is a file called filemanager.php, this is what the image manager calls when it's uploading files. Within the upload function there are these lines:

Code: Select all

				$directory = rtrim(DIR_IMAGE . 'data/' . str_replace('../', '', $this->request->post['directory']), '/');
				
				if (!is_dir($directory)) {
					$json['error'] = $this->language->get('error_directory');
				}
This checks the image directory to be uploaded to exists. So, to see what directory was being checked I added;

Code: Select all

$json['directory'] = $directory;


then uploaded the filemanager.php file, attempted to upload an image again and checked the directory which appeared in the json response in firebug (net tab), I found that I had deleted the data directory so the is_dir($directory) function was returning false and firing the error notification.

I hope this helps someone with this same issue.

Re: Can't upload pictures : Warning! Please select a directo

Posted: Wed Oct 22, 2014 10:50 am
by somnik
hello every one ! i get the same warning, but i can't the images for products on the dashboard or the image manager
so i can't add any new products because i can't upload images. All the folders and images are in the hosting, i see them on filezilla , but they don't appear on oc's image manager. it is very weird! Any ideas/suggestions?

thank you for reading!