ziggi/zimg-host

question - changing upload folder location

georgesuba opened this issue · 2 comments

Hi Ziggi,
Thank you for great script. Can you point me where I can change upload folder? basically I would like to have uload form in /a/zimg/ and images links in /a/file.png - is that even possible? Thank you.

ziggi commented

public function __construct() {
self::$upload_file_dir = __DIR__ . '/../file/';
}

zimg-host/bootstrap.php

Lines 39 to 43 in 0e2f719

if ($is_thumb) {
$file_path = 'file/thumb/' . $file_name[0] . '/' . $file_name[1] . '/' . $file_name;
} else {
$file_path = 'file/' . $file_name[0] . '/' . $file_name[1] . '/' . $file_name;
}

Make sure that the new directory is writable by the web server

Brilliant, THANK YOU!