Skip to content

Commit 275ff3d

Browse files
authored
Merge pull request #10722 from appwrite/feat-per-bucket-image-transformations
feat: per bucket image transformations flag
2 parents 919b01a + 39c5b6c commit 275ff3d

96 files changed

Lines changed: 1035 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/config/collections/common.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,17 @@
15821582
'required' => true,
15831583
'array' => false,
15841584
],
1585+
[
1586+
'$id' => ID::custom('transformations'),
1587+
'type' => Database::VAR_BOOLEAN,
1588+
'signed' => true,
1589+
'size' => 0,
1590+
'format' => '',
1591+
'filters' => [],
1592+
'required' => false,
1593+
'array' => false,
1594+
'default' => true,
1595+
],
15851596
[
15861597
'$id' => ID::custom('search'),
15871598
'type' => Database::VAR_STRING,

app/config/errors.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,11 @@
522522
'description' => 'The requested file is not publicly readable.',
523523
'code' => 403,
524524
],
525+
Exception::STORAGE_BUCKET_TRANSFORMATIONS_DISABLED => [
526+
'name' => Exception::STORAGE_BUCKET_TRANSFORMATIONS_DISABLED,
527+
'description' => 'Image transformations are disabled for the requested bucket.',
528+
'code' => 403,
529+
],
525530

526531
/** Tokens */
527532
Exception::TOKEN_NOT_FOUND => [

app/config/specs/open-api3-1.8.x-console.json

Lines changed: 153 additions & 16 deletions
Large diffs are not rendered by default.

app/config/specs/open-api3-1.8.x-server.json

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7222,7 +7222,8 @@
72227222
"default": {
72237223
"type": "string",
72247224
"description": "Default value for the attribute in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when attribute is required.",
7225-
"x-example": null
7225+
"x-example": null,
7226+
"x-nullable": true
72267227
},
72277228
"array": {
72287229
"type": "boolean",
@@ -13203,10 +13204,22 @@
1320313204
"description": "Path to function code in the template repo.",
1320413205
"x-example": "<ROOT_DIRECTORY>"
1320513206
},
13206-
"version": {
13207+
"type": {
13208+
"type": "string",
13209+
"description": "Type for the reference provided. Can be commit, branch, or tag",
13210+
"x-example": "commit",
13211+
"enum": [
13212+
"commit",
13213+
"branch",
13214+
"tag"
13215+
],
13216+
"x-enum-name": null,
13217+
"x-enum-keys": []
13218+
},
13219+
"reference": {
1320713220
"type": "string",
13208-
"description": "Version (tag) for the repo linked to the function template.",
13209-
"x-example": "<VERSION>"
13221+
"description": "Reference value, can be a commit hash, branch name, or release tag",
13222+
"x-example": "<REFERENCE>"
1321013223
},
1321113224
"activate": {
1321213225
"type": "boolean",
@@ -13218,7 +13231,8 @@
1321813231
"repository",
1321913232
"owner",
1322013233
"rootDirectory",
13221-
"version"
13234+
"type",
13235+
"reference"
1322213236
]
1322313237
}
1322413238
}
@@ -22838,10 +22852,22 @@
2283822852
"description": "Path to site code in the template repo.",
2283922853
"x-example": "<ROOT_DIRECTORY>"
2284022854
},
22841-
"version": {
22855+
"type": {
22856+
"type": "string",
22857+
"description": "Type for the reference provided. Can be commit, branch, or tag",
22858+
"x-example": "branch",
22859+
"enum": [
22860+
"branch",
22861+
"commit",
22862+
"tag"
22863+
],
22864+
"x-enum-name": null,
22865+
"x-enum-keys": []
22866+
},
22867+
"reference": {
2284222868
"type": "string",
22843-
"description": "Version (tag) for the repo linked to the site template.",
22844-
"x-example": "<VERSION>"
22869+
"description": "Reference value, can be a commit hash, branch name, or release tag",
22870+
"x-example": "<REFERENCE>"
2284522871
},
2284622872
"activate": {
2284722873
"type": "boolean",
@@ -22853,7 +22879,8 @@
2285322879
"repository",
2285422880
"owner",
2285522881
"rootDirectory",
22856-
"version"
22882+
"type",
22883+
"reference"
2285722884
]
2285822885
}
2285922886
}
@@ -23911,7 +23938,7 @@
2391123938
"parameters": [
2391223939
{
2391323940
"name": "queries",
23914-
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus",
23941+
"description": "Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https:\/\/appwrite.io\/docs\/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations",
2391523942
"required": false,
2391623943
"schema": {
2391723944
"type": "array",
@@ -24062,6 +24089,11 @@
2406224089
"type": "boolean",
2406324090
"description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled",
2406424091
"x-example": false
24092+
},
24093+
"transformations": {
24094+
"type": "boolean",
24095+
"description": "Are image transformations enabled?",
24096+
"x-example": false
2406524097
}
2406624098
},
2406724099
"required": [
@@ -24258,6 +24290,11 @@
2425824290
"type": "boolean",
2425924291
"description": "Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled",
2426024292
"x-example": false
24293+
},
24294+
"transformations": {
24295+
"type": "boolean",
24296+
"description": "Are image transformations enabled?",
24297+
"x-example": false
2426124298
}
2426224299
},
2426324300
"required": [
@@ -26342,7 +26379,7 @@
2634226379
},
2634326380
"rowSecurity": {
2634426381
"type": "boolean",
26345-
"description": "Enables configuring permissions for individual rows. A user needs one of row or table level permissions to access a document. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
26382+
"description": "Enables configuring permissions for individual rows. A user needs one of row or table-level permissions to access a row. [Learn more about permissions](https:\/\/appwrite.io\/docs\/permissions).",
2634626383
"x-example": false
2634726384
},
2634826385
"enabled": {
@@ -26844,7 +26881,8 @@
2684426881
"default": {
2684526882
"type": "string",
2684626883
"description": "Default value for the column in [ISO 8601](https:\/\/www.iso.org\/iso-8601-date-and-time-format.html) format. Cannot be set when column is required.",
26847-
"x-example": null
26884+
"x-example": null,
26885+
"x-nullable": true
2684826886
},
2684926887
"array": {
2685026888
"type": "boolean",
@@ -42256,6 +42294,11 @@
4225642294
"type": "boolean",
4225742295
"description": "Virus scanning is enabled.",
4225842296
"x-example": false
42297+
},
42298+
"transformations": {
42299+
"type": "boolean",
42300+
"description": "Image transformations are enabled.",
42301+
"x-example": false
4225942302
}
4226042303
},
4226142304
"required": [
@@ -42270,7 +42313,8 @@
4227042313
"allowedFileExtensions",
4227142314
"compression",
4227242315
"encryption",
42273-
"antivirus"
42316+
"antivirus",
42317+
"transformations"
4227442318
],
4227542319
"example": {
4227642320
"$id": "5e5ea5c16897e",
@@ -42289,7 +42333,8 @@
4228942333
],
4229042334
"compression": "gzip",
4229142335
"encryption": false,
42292-
"antivirus": false
42336+
"antivirus": false,
42337+
"transformations": false
4229342338
}
4229442339
},
4229542340
"resourceToken": {

0 commit comments

Comments
 (0)