• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

<IMG src=""> points to physical path instead of URL

schultz-it-solutions

Chevereto Member
Hello team,
i am new to Chevereto (bought a "Network licence" yesterday) and have a kind of specific issue with my server environment and the gallery

🎯Description of the issue
I successfully installed and configured Chevereto on my webserver. For performance (and available storage space) reasons, I decided to place the "images" folder outside the webserver (actually on a separate harddisk at the same server). As the dashboard setting for "image path" is referencing a "path relative to the gallery-root directory" I had to
"tweak" the system to actually use the new target folder when uploading images (through Chevereto).

This part is working as expected (I invented an individual PHP constant with that path and changed two scripts to use this new constant:
/app/loader.php -> define('CHV_PATH_IMAGES', SITS_IMAGE_PATH . CHV_FOLDER_IMAGES . '/');
/app/lib/classes/class.upload.php -> G\add_ending_slash(SITS_IMAGE_PATH . explode('/', preg_replace('#'.SITS_IMAGE_PATH.'#', '', $this->destination, 1))[0]);

So I can upload images and they are stored in "datefolders" on that second harddrive. Great so far!

Issue:
in the frontend however, the images do not show up. The respecitve < img src="" > tag is generated with the PHYSICAL PATH to that image, rather than the URL.


▶🚶‍Reproduction steps

have a look at the gallery at : https://service.schultz.ch/gallery/explore
examine the respective source code of that page for any image and you will see the <img src="..." > points to a physical path


😢Unexpected result

Images are not found (because of the wrongly formatted < IMG > tag

📃Error log message

no errors are produced, but the images are NOT FOUND of course




QUESTION:
Where would I need to change the PHP scripts (that are responsible for rendering the HTML "<img>" tags for the gallery) in order to "translate that physical path to the correct URL" string?

Any help would be greatly appreciated
kind regards
Ruediger Schultz
 
You don't need to touch the source for this.

Use "local" external storage. By doing that you can use any path in your system and you will be able to set the custom URL for it.
 
Back
Top