0

I have Magento 1.8 setup, if I try to print info array in this file

app/code/core/Mage/Sales/controllers/DownloadContorlleres.php

it is printing the full path as below

/var/www/html/media/custom_options/quot/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg

I am not able to download or open the same path. On accessing it with the base url /media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg it throws the error -> You don't have permission to access /media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg on this server.

1
  • Also when passing the file path with base url as stated above still on download i am not table to open the file Commented Jan 29, 2018 at 8:04

1 Answer 1

0

You cannot download or open as it is the physical path of the file. The physical path cannot be opened through the browser. If path looks like

www.website.com/media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg

then you can download the file.

I think you are getting the directory path instead of base URL. Check this, it will work.

4
  • Thanks Kalyan..But when i tried to edit it with the base url as you told then i still have the same issue :( The error is "You don't have permission to access /media/custom_options/quote/w/i/f8e5fcf046a0b213588f15b3d63312d3.jpg on this server." Commented Jan 29, 2018 at 7:55
  • please show what is the complete URL of the image. Also, try to give 777 permission to the media folder, maybe that is the issue. Commented Jan 29, 2018 at 8:27
  • Also i have give 777 to media and its sub directories Commented Jan 29, 2018 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.