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.