mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
feat: per bucket image transformations flag
This commit is contained in:
@@ -150,6 +150,7 @@ class Exception extends \Exception
|
||||
public const string STORAGE_INVALID_RANGE = 'storage_invalid_range';
|
||||
public const string STORAGE_INVALID_APPWRITE_ID = 'storage_invalid_appwrite_id';
|
||||
public const string STORAGE_FILE_NOT_PUBLIC = 'storage_file_not_public';
|
||||
public const string STORAGE_BUCKET_TRANSFORMATIONS_DISABLED = 'storage_bucket_transformations_disabled';
|
||||
|
||||
/** VCS */
|
||||
public const string INSTALLATION_NOT_FOUND = 'installation_not_found';
|
||||
|
||||
@@ -136,6 +136,16 @@ class V23 extends Migration
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$this->createAttributeFromCollection(
|
||||
$this->dbForPlatform,
|
||||
'buckets',
|
||||
'transformations',
|
||||
);
|
||||
} catch (Throwable $th) {
|
||||
Console::warning("'transformations' from 'buckets': {$th->getMessage()}");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,8 @@ class Buckets extends Base
|
||||
'fileSecurity',
|
||||
'maximumFileSize',
|
||||
'encryption',
|
||||
'antivirus'
|
||||
'antivirus',
|
||||
'transformations',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -86,6 +86,12 @@ class Bucket extends Model
|
||||
'default' => true,
|
||||
'example' => false,
|
||||
])
|
||||
->addRule('transformations', [
|
||||
'type' => self::TYPE_BOOLEAN,
|
||||
'description' => 'Image transformations are enabled.',
|
||||
'default' => true,
|
||||
'example' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user