Setting fields "Upload Folder" in server setting

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
crazy1234hk
User
Posts: 3

Setting fields "Upload Folder" in server setting

Post 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.


mobhar
User
Posts: 11747

Post by mobhar »

You may search in this forum by using UploadPath keyword.


Post Reply