Jump to content

upload pics


Recommended Posts

everytime when i try to upload the pics
it always went blank page when it done
then product did add it in, but not the pics together
how can i solve this problem

i had find out that the pic upload should same into img/p/(then the pic)

but now the pic were all upload into img/tmp/

and the name wasn't same as the default upload name same as in img/p/
also it didn't have the file type for it, it didn't have the .jpg, or whatever it should be. it was just blank with file name PSsth without .sth

36779_TgftuHgUNUUQCYtybNoc_t

36780_wsOKl7YrakMEt0sGHqg3_t

Link to comment
Share on other sites

Edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on'. That will display an error message instead of a blank tab. My guess is that you are exceeding the memory limit. If so, you should increase your memory limit, or reduce the size of the images you are uploading.

Link to comment
Share on other sites

if i want to increase my memory limit, then wt do i need to do for it
where can i do this step?

but i had check that the size of the images is still under the requirement of what default it set at 2000kb
but if i reduce the pixels, then everything work fine!!

i dont get why this happened?

Link to comment
Share on other sites

The bigger an image is, the more memory is required to load it to create thumbnails. That's why uploading smaller images works and uploading bigger images doesn't.

You can edit your php.ini file (or create one) and increase the memory_limit line to 32M, 64M or 128M depending on how much your host allows.

Link to comment
Share on other sites

  • 3 months later...

Hey

iv uploaded a file but get the following error?
using prestashop 1.4, edited the php.ini file and edited the Preferance>2M limit to more.

still i get this funny error? file missing? even tho it says successful?

see attached pic

43210_Ayk36303ofhkSf8AhR84_t

Link to comment
Share on other sites

Did you wait for the file to finish uploading before clicking "Save and stay"? The file is uploaded using AJAX, then a yellow message box appears when the upload has finished. You can then click "Save and stay". If you click "Save and stay" before the file has uploaded, you might get that message.

Link to comment
Share on other sites

Does the file exceed the file limit? Try changing lines 31-32 of admin/tabs/AdminProducts.php:

protected $maxImageSize = 2000000;
protected $maxFileSize  = 10000000;



It specifies the maximum number of bytes allowed for images and file uploads.

Link to comment
Share on other sites

I see in your post above you are getting an "Unknown error". I found the source of the error on lines 57-61 of admin/uploadProductFile.php:

else
{
   header('HTTP/1.1 500 Error');
   echo '';
}



It appears there is a 500 error when uploading the file. That probably means there is a permissions issue. Make sure your img and img/tmp directory are chmod 755.

Link to comment
Share on other sites

Nope doesnt work, set them to 755.

just to backtrack what iv done :
1) php.ini file ( maxsize 20mb )
2) BO > Preference - 20mb
3) IMG and IMG/TMP set to 755

File im uploading is 5mb mp3 file...

is there something iv missed?

Link to comment
Share on other sites

Yes, if it hasn't changed, then it didn't work. Which setting did you change on the Preferences tab? I can only see "Maximum size of product pictures", which applies to product images, not downloadable products.

I can see the following on line 2415 of admin/tabs/AdminProducts.php:


<?php echo $this->l('Your server\'s maximum upload file size is') . ': ' . ini_get('upload_max_filesize') ?>



Make sure that upload_max_filesize has correctly been changed in the php.ini file. Put the file in the admin directory too, not just the root directory, so it applies to the Back Office.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...