KenSTJ Posted January 20, 2013 Share Posted January 20, 2013 OK, enough's enough - come on Prestashop Support - uploading images is a basic function that is not working. This does: This is for version 1.5.3.1 Take your time and BE CAREFUL! 1. Navigate to controllers/admin/AdminImportController.php 2. Make/Save a copy of AdminImportController.php - just in case you need to resurrect it. 3. Open AdminImportController.php with a suitable application (Notepad, Dreamweaver, whatever...) 4. Scroll down to line (approx) 645 you are looking for the following lines to delete: 645 do $uniqid = uniqid(); while (file_exists(_PS_UPLOAD_DIR_.$uniqid)); 646 $tmp_file = file_put_contents(_PS_UPLOAD_DIR_.$uniqid, $field); 647 $fd = fopen($temp, 'r'); 5. Delete the 3-lines above (the lines are important to delete - the line numbers in case your numbers differ slightly) 6. Add the following lines in their place: 645 do $uniqid_path = _PS_UPLOAD_DIR_.uniqid(); while (file_exists($uniqid_path)); 646 file_put_contents($uniqid_path, $field); 647 $fd = fopen($uniqid_path, 'r'); 7. Delete the following line which is just a line or two down - apprx 650 650 unlink($tmp_file); 8. Replace it with: 650 unlink($uniqid_path); 9. Save the file - your images will now upload (You're Welcome!) 1 Link to comment Share on other sites More sharing options...
Robster Posted May 30, 2013 Share Posted May 30, 2013 I approve of this post, it fixed my problem in a clear and concise way. Thanks for posting! Rob Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now