Hello opencart users!
I have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.
Has anyone an idea how to access "sym link"-directories?
Best regards,
Holger
I have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.
Has anyone an idea how to access "sym link"-directories?
Best regards,
Holger
What permissions have you set to those folders?
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
HI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
Ensure your DIR_IMAGE 's sub-folders also matches your sub-folder names on the database aside from the permission issues. As for the folder permissions themselves, ensure to apply those changes from FTP.haxcop wrote: ↑Sat May 16, 2020 6:43 amHI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
thanks for your reply.straightlight wrote: ↑Sat May 16, 2020 7:44 amEnsure your DIR_IMAGE 's sub-folders also matches your sub-folder names on the database aside from the permission issues. As for the folder permissions themselves, ensure to apply those changes from FTP.haxcop wrote: ↑Sat May 16, 2020 6:43 amHI guys interested on this particular topic. I have tried using this approach but doesn't seems to work ok OC 3.x
I have also renamed the DIR_IMAGE directly to the folder I want to try but at this instance what I get is only broken links images
any ideas to properly use this approach to storage the images, Is possible ?...
In fact, I did - my paths are like this
DIR_IMAGE, '/my/other/path/images/[same as the default]'
the permissions and group/owner of the folders and files are the same as original
now in regards of the Database. could you please explain a bit better?
in the db tables where images are found remains intact as it should be for example:
catalog/pics/31882.jpg
and match the same folder structure
Thanks
Ensure your image field values in the product table follows the same sub-folders path as well as in your product_image table.now in regards of the Database. could you please explain a bit better?
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
You can not see images from symlink because it converts to the real path before serving and OC ensures images are serving from the `catalog` directoryoc_ms wrote: ↑Sat Sep 02, 2017 3:53 amI have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.
One workaround could be removing `realpath()` function from files `admin/controller/common/filemanager.php`, `admin/model/tool/image.php`and `catalog/model/tool/image.php`
Though you may face other repercussions as the function `realpath()` is intended to resolve `relative to absolute` path as well. So use your own risk.
XForm - Opencart Form Builder
Xshippingpro - An advanced Shipping Module
Need Professional support? Skype: opencartmart
i do not see realpath() in - admin/controller/common/filemanager.php, in OC version 3.0opencartmart wrote: ↑Sat May 23, 2020 2:51 pmYou can not see images from symlink because it converts to the real path before serving and OC ensures images are serving from the `catalog` directoryoc_ms wrote: ↑Sat Sep 02, 2017 3:53 amI have created a sym link (ln -s) under "upload/images/catalog" to an image directory within the server. I can access it in the shell without any problems. If I go to the file manager to upload an image to a product I can see the directory. But when I click on it, no files within the directory are shown.
One workaround could be removing `realpath()` function from files `admin/controller/common/filemanager.php`, `admin/model/tool/image.php`and `catalog/model/tool/image.php`
Though you may face other repercussions as the function `realpath()` is intended to resolve `relative to absolute` path as well. So use your own risk.
The only way to work this, is instead of creating symlink, to bind mount one folder to another
For example in fstab:
/var/www/{site where you have the images}/html/image/catalog/products /var/www/{site where you want to symlink}/html/image/catalog/products none defaults,bind 0 0
For example in fstab:
/var/www/{site where you have the images}/html/image/catalog/products /var/www/{site where you want to symlink}/html/image/catalog/products none defaults,bind 0 0
Who is online
Users browsing this forum: Google [Bot] and 139 guests