Page 1 of 1

Setting fields "Upload Folder" in server setting

Posted: Sat Apr 27, 2024 5:39 pm
by crazy1234hk

Hello

I have setup a field to upload image to S3.

Currently, the "upload folder" is "s3://my-bucket-name/dev/images/category/". It is working properly.

Is there a way to replace "dev" to "prod" (i.e. "s3://my-bucket-name/prod/images/category/") via"Server Events" base on some conditions?

eg: I can change the database connection info in "Database_Connecting" event. Is there something similar for changing "upload folder"?

function Database_Connecting(&$info)
{
    if (strcmp($_SERVER['HTTP_HOST'], 'localhost') == 0) {
		// dev
	} else {
        $info["host"] = "xx.xx.xx.xx";
        $info["user"] = "xxx";
        $info["pass"] = "xxxx";
        $info["db"] = "xxx";
    }
}

Thank you.


Re: Setting fields "Upload Folder" in server setting

Posted: Sat Apr 27, 2024 7:04 pm
by mobhar

You may search in this forum by using UploadPath keyword.