I am trying to upload an image from customer product page (upload file option), the image is uploaded to system/upload
folder and renamed with: filename + md5 hash string. So, for example I upload image.jpg
, the file will be uploaded to system/upload/image.jpg.392da1267fbfa4be65f7859bb0b974d9
.
Now I want to see that image uploaded by customer from admin page (I created a new module page), how can I resize and display the image file? I can get the file name from table oc_upload
in database, but the phisical file is using modified name which has no extension, I cannot resize this file because it is located in system/upload
folder and its extension is changed. The image resize tool can only resize images in image
folder with some allowed extensions configured in Settings page.
Any idea how to display images uploaded by customer? Do I need to copy the renamed uploaded file to image
folder using its original name and then resize and display it? I appreciate any of your ideas. Thank you.