From 76695a032ae6f364384523092ac9f131d32b9edc Mon Sep 17 00:00:00 2001 From: Alex Weininger Date: Fri, 4 Jun 2021 13:35:59 -0700 Subject: [PATCH 01/14] Add information about _APP_STORAGE_LIMIT environment variable Discussed in discord, adding this for give the _APP_STORAGE_LIMIT env variable more exposure. Since users might come to this doc page looking for information on max file size. --- docs/services/storage.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/services/storage.md b/docs/services/storage.md index 0de9eb891..436fffb3e 100644 --- a/docs/services/storage.md +++ b/docs/services/storage.md @@ -2,4 +2,6 @@ The Storage service allows you to manage your project files. Using the Storage s Each file in the service is granted with read and write permissions to manage who has access to view or edit it. You can also learn more about how to manage your [resources permissions](/docs/permissions). -The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network. \ No newline at end of file +The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network. + +The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 10 MB. See [Environment Variables](https://appwrite.io/docs/environment-variables#storage) for more information. From 9df694a253c5cef46cedb956f0a7485fe434ec37 Mon Sep 17 00:00:00 2001 From: Alex Weininger Date: Fri, 4 Jun 2021 13:41:31 -0700 Subject: [PATCH 02/14] Avoid hardcoding URL Co-authored-by: kodumbeats --- docs/services/storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services/storage.md b/docs/services/storage.md index 436fffb3e..5b046d318 100644 --- a/docs/services/storage.md +++ b/docs/services/storage.md @@ -4,4 +4,4 @@ Each file in the service is granted with read and write permissions to manage wh The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network. -The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 10 MB. See [Environment Variables](https://appwrite.io/docs/environment-variables#storage) for more information. +The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 10 MB. See [Environment Variables](/docs/environment-variables#storage) for more information. From 53982458cd7d6be56699dc8e6796ca581dd8b3d8 Mon Sep 17 00:00:00 2001 From: Bishwajeet Parhi <62933155+2002Bishwajeet@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:28:44 +0530 Subject: [PATCH 03/14] Update GETTING_START.md for flutter --- docs/sdks/flutter/GETTING_STARTED.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 28899ff18..22bbc9a8b 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -10,11 +10,15 @@ If you are building your Flutter application for multiple devices, you have to f ### Android For **Android** first add your app name and package name, Your package name is generally the **applicationId** in your app-level build.gradle file. By registering your new app platform, you are allowing your app to communicate with the Appwrite API. -In order to capture the Appwrite OAuth callback url, the following activity needs to be added to your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml). Be sure to replace the **[PROJECT_ID]** string with your actual Appwrite project ID. You can find your Appwrite project ID in your project settings screen in the console. +In order to capture the Appwrite OAuth callback url, the following activity needs to be added inside the `` tag, along side the existing `` tags in your [AndroidManifest.xml](https://github.com/appwrite/playground-for-flutter/blob/master/android/app/src/main/AndroidManifest.xml). Be sure to replace the **[PROJECT_ID]** string with your actual Appwrite project ID. You can find your Appwrite project ID in your project settings screen in the console. ```xml - - + + .... + + .... + + From 8b170cbbd2febc121a238b59af59cd16028d1ccd Mon Sep 17 00:00:00 2001 From: Gireesh Puthumana Date: Sun, 26 Sep 2021 17:33:36 -0400 Subject: [PATCH 04/14] Fix for #1662. Corrected the spelling in the logs. --- app/http.php | 4 ++-- app/realtime.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/http.php b/app/http.php index 9a3a5459d..2f042ba99 100644 --- a/app/http.php +++ b/app/http.php @@ -30,7 +30,7 @@ $http ; $http->on('WorkerStart', function($serv, $workerId) { - Console::success('Worker '.++$workerId.' started succefully'); + Console::success('Worker '.++$workerId.' started successfully'); }); $http->on('BeforeReload', function($serv, $workerId) { @@ -43,7 +43,7 @@ $http->on('AfterReload', function($serv, $workerId) { $http->on('start', function (Server $http) use ($payloadSize) { - Console::success('Server started succefully (max payload is '.number_format($payloadSize).' bytes)'); + Console::success('Server started successfully (max payload is '.number_format($payloadSize).' bytes)'); Console::info("Master pid {$http->master_pid}, manager pid {$http->manager_pid}"); diff --git a/app/realtime.php b/app/realtime.php index 70eacc0d4..6a771d490 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -49,7 +49,7 @@ $adapter->setPackageMaxLength(64000); // Default maximum Package Size (64kb) $server = new Server($adapter); $server->onStart(function () use ($stats, $register, $containerId, &$documentId) { - Console::success('Server started succefully'); + Console::success('Server started successfully'); $getConsoleDb = function () use ($register) { $db = $register->get('dbPool')->get(); @@ -164,7 +164,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$documentId) }); $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $realtime) { - Console::success('Worker ' . $workerId . ' started succefully'); + Console::success('Worker ' . $workerId . ' started successfully'); $attempts = 0; $start = time(); From 1e5e84b10ad0b11df36af11840f850741ba20d20 Mon Sep 17 00:00:00 2001 From: Bishwajeet Parhi <62933155+2002Bishwajeet@users.noreply.github.com> Date: Sun, 3 Oct 2021 14:24:56 +0530 Subject: [PATCH 05/14] removing a blank space --- docs/sdks/flutter/GETTING_STARTED.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/sdks/flutter/GETTING_STARTED.md b/docs/sdks/flutter/GETTING_STARTED.md index 22bbc9a8b..745db5b8a 100644 --- a/docs/sdks/flutter/GETTING_STARTED.md +++ b/docs/sdks/flutter/GETTING_STARTED.md @@ -17,7 +17,6 @@ In order to capture the Appwrite OAuth callback url, the following activity need .... .... - From 8108bf033211d38c567935267aef8218ae0d5e3c Mon Sep 17 00:00:00 2001 From: Wen Yu Ge Date: Wed, 1 Jun 2022 15:43:46 -0400 Subject: [PATCH 06/14] fix function deploy directory --- app/views/console/functions/function.phtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/console/functions/function.phtml b/app/views/console/functions/function.phtml index 68779e886..17bb873ee 100644 --- a/app/views/console/functions/function.phtml +++ b/app/views/console/functions/function.phtml @@ -703,7 +703,7 @@ sort($patterns); --functionId={{project-function.$id}} \ --activate=true \ --entrypoint='scriptFile' \ - --code='/myrepo/myfunction'" data-forms-code="bash" data-lang="bash" data-lang-label="Bash"> + --code='.'" data-forms-code="bash" data-lang="bash" data-lang-label="Bash">

PowerShell

@@ -713,7 +713,7 @@ sort($patterns); --functionId={{project-function.$id}} ` --activate=true ` --entrypoint='scriptFile' ` - --code='/myrepo/myfunction'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell"> + --code='.'" data-forms-code="powershell" data-lang="powershell" data-lang-label="PowerShell">

Learn more about creating deployments, installing and using the Appwrite CLI.

From 4830f89ed3ce8f7d31ae220e6b47039404a6e656 Mon Sep 17 00:00:00 2001 From: Chuong Tang Date: Thu, 2 Jun 2022 08:38:33 -0600 Subject: [PATCH 07/14] Added webm into mimeType and previewType --- app/config/storage/logos.php | 1 + app/config/storage/mimes.php | 1 + 2 files changed, 2 insertions(+) diff --git a/app/config/storage/logos.php b/app/config/storage/logos.php index 8816611ed..d87019826 100644 --- a/app/config/storage/logos.php +++ b/app/config/storage/logos.php @@ -7,6 +7,7 @@ return [ // Based on this list @see http://stackoverflow.com/a/4212908/2299554 // Video Files 'video/mp4' => __DIR__.'/logos/video.png', 'video/x-flv' => __DIR__.'/logos/video.png', + 'video/webm' => __DIR__.'/logos/video.png', 'application/x-mpegURL' => __DIR__.'/logos/video.png', 'video/MP2T' => __DIR__.'/logos/video.png', 'video/3gpp' => __DIR__.'/logos/video.png', diff --git a/app/config/storage/mimes.php b/app/config/storage/mimes.php index 7995ef368..1c732307d 100644 --- a/app/config/storage/mimes.php +++ b/app/config/storage/mimes.php @@ -10,6 +10,7 @@ return [ // Video Files 'video/mp4', 'video/x-flv', + 'video/webm', 'application/x-mpegURL', 'video/MP2T', 'video/3gpp', From ee07af85fc914f6585f809de5f3182e04dc03c22 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 3 Jun 2022 12:27:46 +0200 Subject: [PATCH 08/14] Update storage.md --- docs/services/storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/services/storage.md b/docs/services/storage.md index 5b046d318..0e2f7c6ea 100644 --- a/docs/services/storage.md +++ b/docs/services/storage.md @@ -4,4 +4,4 @@ Each file in the service is granted with read and write permissions to manage wh The preview endpoint allows you to generate preview images for your files. Using the preview endpoint, you can also manipulate the resulting image so that it will fit perfectly inside your app in terms of dimensions, file size, and style. The preview endpoint also allows you to change the resulting image file format for better compression or image quality for better delivery over the network. -The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 10 MB. See [Environment Variables](/docs/environment-variables#storage) for more information. +The maximum file size allowed for file upload is controlled by the `_APP_STORAGE_LIMIT` environment variable, which defaults to 30 MB. See [Environment Variables](/docs/environment-variables#storage) for more information. From d9f53d6e23dc87a38f508a094d91a6a7eb0d8f50 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Fri, 3 Jun 2022 12:34:44 +0200 Subject: [PATCH 09/14] Update realtime.php --- app/realtime.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/realtime.php b/app/realtime.php index afe4a2756..7f3264f31 100644 --- a/app/realtime.php +++ b/app/realtime.php @@ -186,6 +186,7 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume }); }); +$server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $realtime, $logError) { Console::success('Worker ' . $workerId . ' started successfully'); $attempts = 0; From a456634324cdb57c9832e6e0546c0b7ef011a6d3 Mon Sep 17 00:00:00 2001 From: Everly Precia Suresh Date: Mon, 6 Jun 2022 13:32:58 +0000 Subject: [PATCH 10/14] fix linter issues --- app/config/storage/logos.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/config/storage/logos.php b/app/config/storage/logos.php index 70e73208b..9db909653 100644 --- a/app/config/storage/logos.php +++ b/app/config/storage/logos.php @@ -6,15 +6,15 @@ return [ // Based on this list @see http://stackoverflow.com/a/4212908/2299554 // Video Files - 'video/mp4' => __DIR__.'/logos/video.png', - 'video/x-flv' => __DIR__.'/logos/video.png', - 'video/webm' => __DIR__.'/logos/video.png', - 'application/x-mpegURL' => __DIR__.'/logos/video.png', - 'video/MP2T' => __DIR__.'/logos/video.png', - 'video/3gpp' => __DIR__.'/logos/video.png', - 'video/quicktime' => __DIR__.'/logos/video.png', - 'video/x-msvideo' => __DIR__.'/logos/video.png', - 'video/x-ms-wmv' => __DIR__.'/logos/video.png', + 'video/mp4' => __DIR__ . '/logos/video.png', + 'video/x-flv' => __DIR__ . '/logos/video.png', + 'video/webm' => __DIR__ . '/logos/video.png', + 'application/x-mpegURL' => __DIR__ . '/logos/video.png', + 'video/MP2T' => __DIR__ . '/logos/video.png', + 'video/3gpp' => __DIR__ . '/logos/video.png', + 'video/quicktime' => __DIR__ . '/logos/video.png', + 'video/x-msvideo' => __DIR__ . '/logos/video.png', + 'video/x-ms-wmv' => __DIR__ . '/logos/video.png', From 254a075d7df3b38c79c98c71afb38b1e40e37007 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 7 Jun 2022 08:57:37 +1200 Subject: [PATCH 11/14] Update JWT creation abuse limits --- app/controllers/api/account.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index 10c978988..c039c2134 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -965,7 +965,7 @@ App::post('/v1/account/jwt') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_JWT) - ->label('abuse-limit', 10) + ->label('abuse-limit', 100) ->label('abuse-key', 'url:{url},userId:{userId}') ->inject('response') ->inject('user') From 742b49723f7c2536ab84cddc2424f4a01bd0da08 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Tue, 7 Jun 2022 09:53:09 +1200 Subject: [PATCH 12/14] Check for ratelimit remaining in create jwt test --- tests/e2e/Services/Account/AccountCustomClientTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index b54711305..5b5ceb018 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -270,6 +270,7 @@ class AccountCustomClientTest extends Scope ])); $this->assertEquals($response['headers']['status-code'], 201); + $this->assertEquals($response['headers']['X-RateLimit-Remaining'], 99); $this->assertNotEmpty($response['body']['jwt']); $this->assertIsString($response['body']['jwt']); From c368c5cae37eb3fcf3a0e2f4490cd6777d80f075 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 9 Jun 2022 11:17:15 +1200 Subject: [PATCH 13/14] Fix ratelimit remaining header test casing --- tests/e2e/Services/Account/AccountCustomClientTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 5b5ceb018..6427db755 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -269,8 +269,10 @@ class AccountCustomClientTest extends Scope 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); + \var_dump($response); + $this->assertEquals($response['headers']['status-code'], 201); - $this->assertEquals($response['headers']['X-RateLimit-Remaining'], 99); + $this->assertEquals($response['headers']['x-ratelimit-remaining'], 99); $this->assertNotEmpty($response['body']['jwt']); $this->assertIsString($response['body']['jwt']); From c0cf93494cd6144cb2a85e17c4040c037dbfb3d7 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Thu, 9 Jun 2022 11:23:06 +1200 Subject: [PATCH 14/14] Remove var dump --- tests/e2e/Services/Account/AccountCustomClientTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/e2e/Services/Account/AccountCustomClientTest.php b/tests/e2e/Services/Account/AccountCustomClientTest.php index 6427db755..3f300f184 100644 --- a/tests/e2e/Services/Account/AccountCustomClientTest.php +++ b/tests/e2e/Services/Account/AccountCustomClientTest.php @@ -269,8 +269,6 @@ class AccountCustomClientTest extends Scope 'cookie' => 'a_session_' . $this->getProject()['$id'] . '=' . $session, ])); - \var_dump($response); - $this->assertEquals($response['headers']['status-code'], 201); $this->assertEquals($response['headers']['x-ratelimit-remaining'], 99); $this->assertNotEmpty($response['body']['jwt']);