Merge branch 'master' of github.com:appwrite/appwrite into lazy-delete
This commit is contained in:
commit
d09603f9e3
28 changed files with 274 additions and 187 deletions
14
CHANGES.md
14
CHANGES.md
|
@ -1,3 +1,17 @@
|
||||||
|
# Version 0.6.2 (PRE-RELEASE)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- New route in Locale API to fetch list of languages
|
||||||
|
|
||||||
|
## Bug Fixes
|
||||||
|
|
||||||
|
- Fixed custom domain not setting correct domain
|
||||||
|
- Fixed wrong SDK method type in avatars browser route
|
||||||
|
- Fixed bug denied public documents (*) to be accessed by guest users
|
||||||
|
- Fixed cache control issue not allowing collection UI to update properly
|
||||||
|
- Added missing webhooks events in the console
|
||||||
|
|
||||||
# Version 0.6.1 (PRE-RELEASE)
|
# Version 0.6.1 (PRE-RELEASE)
|
||||||
|
|
||||||
## Bug Fixes
|
## Bug Fixes
|
||||||
|
|
|
@ -53,6 +53,7 @@ ENV TZ=Asia/Tel_Aviv \
|
||||||
_APP_OPTIONS_ABUSE=enabled \
|
_APP_OPTIONS_ABUSE=enabled \
|
||||||
_APP_OPENSSL_KEY_V1=your-secret-key \
|
_APP_OPENSSL_KEY_V1=your-secret-key \
|
||||||
_APP_STORAGE_LIMIT=104857600 \
|
_APP_STORAGE_LIMIT=104857600 \
|
||||||
|
_APP_STORAGE_ANTIVIRUS=enabled \
|
||||||
_APP_REDIS_HOST=redis \
|
_APP_REDIS_HOST=redis \
|
||||||
_APP_REDIS_PORT=6379 \
|
_APP_REDIS_PORT=6379 \
|
||||||
_APP_DB_HOST=mariadb \
|
_APP_DB_HOST=mariadb \
|
||||||
|
|
64
README.md
64
README.md
|
@ -14,14 +14,9 @@
|
||||||
[![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io)
|
[![Twitter Account](https://badgen.net/twitter/follow/appwrite_io?label=twitter)](https://twitter.com/appwrite_io)
|
||||||
[![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite)
|
[![Follow Appwrite on StackShare](https://badgen.net/badge/follow%20on/stackshare/blue)](https://stackshare.io/appwrite)
|
||||||
|
|
||||||
|
Appwrite is an end-to-end backend server for Web, Mobile, Native, or Backend apps packaged as a set of Docker microservices. Appwrite abstract the complexity and repetitiveness required to build a modern backend API from scratch to allow you to build secure apps faster.
|
||||||
|
|
||||||
Appwrite is a simple self-hosted backend server for web and mobile developers with a shiny dashboard and a very easy-to-use REST API.
|
Using Appwrite, you can easily integrate your app with user authentication & multiple sign-in methods, a database for storing and querying users and team data, storage and file management, image manipulation, schedule CRON tasks, and [more services](https://appwrite.io/docs).
|
||||||
|
|
||||||
Appwrite API services aim to make developer's life a lot easier by hiding the complexity of common and repetitive software development tasks.
|
|
||||||
|
|
||||||
Using Appwrite, you can easily manage user authentication with multiple sign-in methods, a database for storing and querying user and team data, storage and file management, image manipulation and cropping, schedule cron tasks and many other features to help you get more results in faster times and with a lot less code.
|
|
||||||
|
|
||||||
Appwrite can also integrate really well with your backend. Appwrite can work behind your own proxy facing your internal network, or alongside your own custom backend. You can use Appwrite server SDK to integrate your backend with Appwrite's APIs and webhooks.
|
|
||||||
|
|
||||||
[https://appwrite.io](https://appwrite.io)
|
[https://appwrite.io](https://appwrite.io)
|
||||||
|
|
||||||
|
@ -30,10 +25,15 @@ Appwrite can also integrate really well with your backend. Appwrite can work beh
|
||||||
Table of Contents:
|
Table of Contents:
|
||||||
|
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Changing Port Number](#changing-port-number)
|
- [Unix](#unix)
|
||||||
|
- [Windows](#windows)
|
||||||
|
- [CMD](#cmd)
|
||||||
|
- [PowerShell](#powershell)
|
||||||
- [Getting Started](#getting-started)
|
- [Getting Started](#getting-started)
|
||||||
- [Services](#services)
|
- [Services](#services)
|
||||||
- [SDKs](#sdks)
|
- [SDKs](#sdks)
|
||||||
|
- [Client](#client)
|
||||||
|
- [Server](#server)
|
||||||
- [Security](#security)
|
- [Security](#security)
|
||||||
- [Follow Us](#follow-us)
|
- [Follow Us](#follow-us)
|
||||||
- [Contributing](#contributing)
|
- [Contributing](#contributing)
|
||||||
|
@ -45,6 +45,8 @@ Appwrite backend server is designed to run in a container environment. Running y
|
||||||
|
|
||||||
The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command make sure you have [Docker](https://www.docker.com/products/docker-desktop) installed on your machine:
|
The easiest way to start running your Appwrite server is by running our docker-compose file. Before running the installation command make sure you have [Docker](https://www.docker.com/products/docker-desktop) installed on your machine:
|
||||||
|
|
||||||
|
### Unix
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm \
|
docker run -it --rm \
|
||||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
@ -53,20 +55,39 @@ docker run -it --rm \
|
||||||
appwrite/install
|
appwrite/install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
#### CMD
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
docker run -it --rm ^
|
||||||
|
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||||
|
--volume "%cd%"/appwrite:/install/appwrite:rw ^
|
||||||
|
-e version=0.6.1 ^
|
||||||
|
appwrite/install
|
||||||
|
```
|
||||||
|
|
||||||
|
#### PowerShell
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
docker run -it --rm ,
|
||||||
|
--volume /var/run/docker.sock:/var/run/docker.sock ,
|
||||||
|
--volume ${pwd}/appwrite:/install/appwrite:rw ,
|
||||||
|
-e version=0.6.1 ,
|
||||||
|
appwrite/install
|
||||||
|
```
|
||||||
|
|
||||||
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.
|
Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-linux native hosts, the server might take a few minutes to start after installation completes.
|
||||||
|
|
||||||
|
|
||||||
For advanced production and custom installation, check out our Docker [environment variables](docs/tutorials/environment-variables.md) docs.
|
For advanced production and custom installation, check out our Docker [environment variables](docs/tutorials/environment-variables.md) docs. You can also use our public [docker-compose.yml](https://appwrite.io/docker-compose.yml) file to manually set up and environment.
|
||||||
|
|
||||||
### Changing Port Number
|
|
||||||
|
|
||||||
In case your port 80 is already taken, change the port number in the command above. Make sure to set the correct endpoint in your selected SDK, including your new port number.
|
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
|
Getting started with Appwrite is as easy as creating a new project, choosing your platform and integrating its SDK in your code. You can easily get started with your platform of choice by reading one of our Getting Started tutorials.
|
||||||
|
|
||||||
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
|
* [Getting Started for Web](https://appwrite.io/docs/getting-started-for-web)
|
||||||
|
* [Getting Started for Flutter](https://appwrite.io/docs/getting-started-for-flutter)
|
||||||
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
|
* [Getting Started for Server](https://appwrite.io/docs/getting-started-for-server)
|
||||||
* Getting Started for Android (soon...)
|
* Getting Started for Android (soon...)
|
||||||
* Getting Started for iOS (soon...)
|
* Getting Started for iOS (soon...)
|
||||||
|
@ -81,22 +102,25 @@ Getting started with Appwrite is as easy as creating a new project, choosing you
|
||||||
* [**Locale**](https://appwrite.io/docs/locale) - Track your user's location, and manage your app locale-based data.
|
* [**Locale**](https://appwrite.io/docs/locale) - Track your user's location, and manage your app locale-based data.
|
||||||
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes.
|
* [**Avatars**](https://appwrite.io/docs/avatars) - Manage your users' avatars, countries' flags, browser icons, credit card symbols, and generate QR codes.
|
||||||
|
|
||||||
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io).
|
For the complete API documentation, visit [https://appwrite.io/docs](https://appwrite.io/docs). For more tutorials, news and announcements check out our [blog](https://medium.com/appwrite-io) and [Discord Server](https://discord.gg/GSeTUeA).
|
||||||
|
|
||||||
### SDKs
|
### SDKs
|
||||||
|
|
||||||
Currently, we support only a few SDK libraries and are constantly working on including new ones.
|
|
||||||
|
|
||||||
Below is a list of currently supported platforms and languages. If you wish to help us add support to your platform of choice, you can go over to our [SDK Generator](https://github.com/appwrite/sdk-generator) project and view our [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md).
|
Below is a list of currently supported platforms and languages. If you wish to help us add support to your platform of choice, you can go over to our [SDK Generator](https://github.com/appwrite/sdk-generator) project and view our [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md).
|
||||||
|
|
||||||
* ✅ [JS](https://github.com/appwrite/sdk-for-js) (Maintained by the Appwrite Team)
|
#### Client
|
||||||
|
* ✅ [Web](https://github.com/appwrite/sdk-for-js) (Maintained by the Appwrite Team)
|
||||||
|
* ✅ [Flutter](https://github.com/appwrite/sdk-for-flutter) (Maintained by the Appwrite Team)
|
||||||
|
|
||||||
|
#### Server
|
||||||
* ✅ [NodeJS](https://github.com/appwrite/sdk-for-node) (Maintained by the Appwrite Team)
|
* ✅ [NodeJS](https://github.com/appwrite/sdk-for-node) (Maintained by the Appwrite Team)
|
||||||
* ✅ [PHP](https://github.com/appwrite/sdk-for-php) (Maintained by the Appwrite Team)
|
* ✅ [PHP](https://github.com/appwrite/sdk-for-php) (Maintained by the Appwrite Team)
|
||||||
|
* ✅ [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Beta** (Maintained by the Appwrite Team)
|
||||||
|
* ✅ [Python](https://github.com/appwrite/sdk-for-python) - **Beta** (Maintained by the Appwrite Team)
|
||||||
* ✅ [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team)
|
* ✅ [Go](https://github.com/appwrite/sdk-for-go) **Work in progress** (Maintained by the Appwrite Team)
|
||||||
* ✅ [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team)
|
* ✅ [Dart](https://github.com/appwrite/sdk-for-dart) **Work in progress** (Maintained by the Appwrite Team)
|
||||||
* ✅ [Ruby](https://github.com/appwrite/sdk-for-ruby) - **Work in progress** (Maintained by the Appwrite Team)
|
|
||||||
* ✅ [Python](https://github.com/appwrite/sdk-for-python) - **Work in progress** (Maintained by the Appwrite Team)
|
Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!
|
||||||
* ✳️ Looking for more SDKs? - Help us by contributing a pull request to our [SDK Generator](https://github.com/appwrite/sdk-generator)!
|
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ $utopia->init(function () use ($utopia, $request, $response, &$user, $project, $
|
||||||
//->addHeader('X-Frame-Options', ($refDomain == 'http://localhost') ? 'SAMEORIGIN' : 'ALLOW-FROM ' . $refDomain)
|
//->addHeader('X-Frame-Options', ($refDomain == 'http://localhost') ? 'SAMEORIGIN' : 'ALLOW-FROM ' . $refDomain)
|
||||||
->addHeader('X-Content-Type-Options', 'nosniff')
|
->addHeader('X-Content-Type-Options', 'nosniff')
|
||||||
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
||||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version')
|
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, Cache-Control, Expires, Pragma')
|
||||||
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
||||||
->addHeader('Access-Control-Allow-Origin', $refDomain)
|
->addHeader('Access-Control-Allow-Origin', $refDomain)
|
||||||
->addHeader('Access-Control-Allow-Credentials', 'true')
|
->addHeader('Access-Control-Allow-Credentials', 'true')
|
||||||
|
@ -246,7 +246,7 @@ $utopia->options(function () use ($request, $response) {
|
||||||
|
|
||||||
$response
|
$response
|
||||||
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
->addHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, PATCH, DELETE')
|
||||||
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, X-Fallback-Cookies')
|
->addHeader('Access-Control-Allow-Headers', 'Origin, Cookie, Set-Cookie, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Access-Control-Request-Headers, Accept, X-Appwrite-Project, X-Appwrite-Key, X-Appwrite-Locale, X-Appwrite-Mode, X-SDK-Version, Cache-Control, Expires, Pragma, X-Fallback-Cookies')
|
||||||
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
->addHeader('Access-Control-Expose-Headers', 'X-Fallback-Cookies')
|
||||||
->addHeader('Access-Control-Allow-Origin', $origin)
|
->addHeader('Access-Control-Allow-Origin', $origin)
|
||||||
->addHeader('Access-Control-Allow-Credentials', 'true')
|
->addHeader('Access-Control-Allow-Credentials', 'true')
|
||||||
|
|
58
app/config/events.php
Normal file
58
app/config/events.php
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of publicly accessiable system events
|
||||||
|
*/
|
||||||
|
return [
|
||||||
|
'account.create' => [
|
||||||
|
'description' => 'This event triggers when the account is created.',
|
||||||
|
],
|
||||||
|
'account.update.email' => [
|
||||||
|
'description' => 'This event triggers when the account email address is updated.',
|
||||||
|
],
|
||||||
|
'account.update.name' => [
|
||||||
|
'description' => 'This event triggers when the account name is updated.',
|
||||||
|
],
|
||||||
|
'account.update.password' => [
|
||||||
|
'description' => 'This event triggers when the account password is updated.',
|
||||||
|
],
|
||||||
|
'account.update.prefs' => [
|
||||||
|
'description' => 'This event triggers when the account preferences are updated.',
|
||||||
|
],
|
||||||
|
'account.delete' => [
|
||||||
|
'description' => 'This event triggers when the account is deleted.',
|
||||||
|
],
|
||||||
|
'account.sessions.create' => [
|
||||||
|
'description' => 'This event triggers when the account session is created.',
|
||||||
|
],
|
||||||
|
'account.sessions.delete' => [
|
||||||
|
'description' => 'This event triggers when the account session is deleted.',
|
||||||
|
],
|
||||||
|
'database.collections.create' => [
|
||||||
|
'description' => 'This event triggers when a database collection is created.',
|
||||||
|
],
|
||||||
|
'database.collections.update' => [
|
||||||
|
'description' => 'This event triggers when a database collection is updated.',
|
||||||
|
],
|
||||||
|
'database.collections.delete' => [
|
||||||
|
'description' => 'This event triggers when a database collection is deleted.',
|
||||||
|
],
|
||||||
|
'database.documents.create' => [
|
||||||
|
'description' => 'This event triggers when a database document is created.',
|
||||||
|
],
|
||||||
|
'database.documents.patch' => [
|
||||||
|
'description' => 'This event triggers when a database document is patched.',
|
||||||
|
],
|
||||||
|
'database.documents.delete' => [
|
||||||
|
'description' => 'This event triggers when a database document is deleted.',
|
||||||
|
],
|
||||||
|
'storage.files.create' => [
|
||||||
|
'description' => 'This event triggers when a storage file is created.',
|
||||||
|
],
|
||||||
|
'storage.files.update' => [
|
||||||
|
'description' => 'This event triggers when a storage file is updated.',
|
||||||
|
],
|
||||||
|
'storage.files.delete' => [
|
||||||
|
'description' => 'This event triggers when a storage file is deleted.',
|
||||||
|
],
|
||||||
|
];
|
|
@ -29,7 +29,7 @@ return [
|
||||||
[
|
[
|
||||||
'key' => 'flutter',
|
'key' => 'flutter',
|
||||||
'name' => 'Flutter',
|
'name' => 'Flutter',
|
||||||
'version' => '0.2.1',
|
'version' => '0.2.2',
|
||||||
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
'url' => 'https://github.com/appwrite/sdk-for-flutter',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
'beta' => true,
|
'beta' => true,
|
||||||
|
|
|
@ -58,6 +58,7 @@ return [
|
||||||
'public',
|
'public',
|
||||||
'home',
|
'home',
|
||||||
'console',
|
'console',
|
||||||
|
'documents.read',
|
||||||
'files.read',
|
'files.read',
|
||||||
'locale.read',
|
'locale.read',
|
||||||
'avatars.read',
|
'avatars.read',
|
||||||
|
|
|
@ -114,6 +114,7 @@ $utopia->get('/v1/avatars/browsers/:code')
|
||||||
->label('sdk.platform', [APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER])
|
->label('sdk.platform', [APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER])
|
||||||
->label('sdk.namespace', 'avatars')
|
->label('sdk.namespace', 'avatars')
|
||||||
->label('sdk.method', 'getBrowser')
|
->label('sdk.method', 'getBrowser')
|
||||||
|
->label('sdk.methodType', 'location')
|
||||||
->label('sdk.description', '/docs/references/avatars/get-browser.md')
|
->label('sdk.description', '/docs/references/avatars/get-browser.md')
|
||||||
->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('browsers', $code, $width, $height, $quality);
|
->action(function ($code, $width, $height, $quality) use ($avatarCallback) { return $avatarCallback('browsers', $code, $width, $height, $quality);
|
||||||
});
|
});
|
||||||
|
|
|
@ -218,7 +218,11 @@ $utopia->get('/v1/health/anti-virus')
|
||||||
->label('sdk.method', 'getAntiVirus')
|
->label('sdk.method', 'getAntiVirus')
|
||||||
->label('sdk.description', '/docs/references/health/get-storage-anti-virus.md')
|
->label('sdk.description', '/docs/references/health/get-storage-anti-virus.md')
|
||||||
->action(
|
->action(
|
||||||
function () use ($response) {
|
function () use ($request, $response) {
|
||||||
|
if($request->getServer('_APP_STORAGE_ANTIVIRUS') === 'disabled') { // Check if scans are enabled
|
||||||
|
throw new Exception('Anitvirus is disabled');
|
||||||
|
}
|
||||||
|
|
||||||
$antiVirus = new Network('clamav', 3310);
|
$antiVirus = new Network('clamav', 3310);
|
||||||
|
|
||||||
$response->json([
|
$response->json([
|
||||||
|
|
|
@ -1229,9 +1229,8 @@ $utopia->post('/v1/projects/:projectId/domains')
|
||||||
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
->param('projectId', null, function () { return new UID(); }, 'Project unique ID.')
|
||||||
->param('domain', null, function () { return new DomainValidator(); }, 'Domain name.')
|
->param('domain', null, function () { return new DomainValidator(); }, 'Domain name.')
|
||||||
->action(
|
->action(
|
||||||
function ($projectId) use ($request, $response, $consoleDB) {
|
function ($projectId, $domain) use ($request, $response, $consoleDB) {
|
||||||
$project = $consoleDB->getDocument($projectId);
|
$project = $consoleDB->getDocument($projectId);
|
||||||
$domain = Config::getParam('domain');
|
|
||||||
|
|
||||||
if (empty($project->getId()) || Database::SYSTEM_COLLECTION_PROJECTS != $project->getCollection()) {
|
if (empty($project->getId()) || Database::SYSTEM_COLLECTION_PROJECTS != $project->getCollection()) {
|
||||||
throw new Exception('Project not found', 404);
|
throw new Exception('Project not found', 404);
|
||||||
|
|
|
@ -179,8 +179,6 @@ $utopia->post('/v1/storage/files')
|
||||||
throw new Exception('File size not allowed', 400);
|
throw new Exception('File size not allowed', 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
$antiVirus = new Network('clamav', 3310);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Models
|
* Models
|
||||||
*/
|
*/
|
||||||
|
@ -200,10 +198,14 @@ $utopia->post('/v1/storage/files')
|
||||||
|
|
||||||
$mimeType = $device->getFileMimeType($path); // Get mime-type before compression and encryption
|
$mimeType = $device->getFileMimeType($path); // Get mime-type before compression and encryption
|
||||||
|
|
||||||
// Check if file size is exceeding allowed limit
|
if($request->getServer('_APP_STORAGE_ANTIVIRUS') === 'enabled') { // Check if scans are enabled
|
||||||
if (!$antiVirus->fileScan($path)) {
|
$antiVirus = new Network('clamav', 3310);
|
||||||
$device->delete($path);
|
|
||||||
throw new Exception('Invalid file', 403);
|
// Check if file size is exceeding allowed limit
|
||||||
|
if (!$antiVirus->fileScan($path)) {
|
||||||
|
$device->delete($path);
|
||||||
|
throw new Exception('Invalid file', 403);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compression
|
// Compression
|
||||||
|
@ -654,53 +656,53 @@ $utopia->delete('/v1/storage/files/:fileId')
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
$utopia->get('/v1/storage/files/:fileId/scan')
|
// $utopia->get('/v1/storage/files/:fileId/scan')
|
||||||
->desc('Scan Storage')
|
// ->desc('Scan Storage')
|
||||||
->label('scope', 'god')
|
// ->label('scope', 'god')
|
||||||
->label('sdk.platform', [APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER])
|
// ->label('sdk.platform', [APP_PLATFORM_CLIENT, APP_PLATFORM_SERVER])
|
||||||
->label('sdk.namespace', 'storage')
|
// ->label('sdk.namespace', 'storage')
|
||||||
->label('sdk.method', 'getFileScan')
|
// ->label('sdk.method', 'getFileScan')
|
||||||
->label('sdk.hide', true)
|
// ->label('sdk.hide', true)
|
||||||
->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
// ->param('fileId', '', function () { return new UID(); }, 'File unique ID.')
|
||||||
->param('storage', 'local', function () { return new WhiteList(['local']);})
|
// ->param('storage', 'local', function () { return new WhiteList(['local']);})
|
||||||
->action(
|
// ->action(
|
||||||
function ($fileId, $storage) use ($response, $request, $projectDB) {
|
// function ($fileId, $storage) use ($response, $request, $projectDB) {
|
||||||
$file = $projectDB->getDocument($fileId);
|
// $file = $projectDB->getDocument($fileId);
|
||||||
|
|
||||||
if (empty($file->getId()) || Database::SYSTEM_COLLECTION_FILES != $file->getCollection()) {
|
// if (empty($file->getId()) || Database::SYSTEM_COLLECTION_FILES != $file->getCollection()) {
|
||||||
throw new Exception('File not found', 404);
|
// throw new Exception('File not found', 404);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$path = $file->getAttribute('path', '');
|
// $path = $file->getAttribute('path', '');
|
||||||
|
|
||||||
if (!file_exists($path)) {
|
// if (!file_exists($path)) {
|
||||||
throw new Exception('File not found in '.$path, 404);
|
// throw new Exception('File not found in '.$path, 404);
|
||||||
}
|
// }
|
||||||
|
|
||||||
$compressor = new GZIP();
|
// $compressor = new GZIP();
|
||||||
$device = Storage::getDevice($storage);
|
// $device = Storage::getDevice($storage);
|
||||||
|
|
||||||
$source = $device->read($path);
|
// $source = $device->read($path);
|
||||||
|
|
||||||
if (!empty($file->getAttribute('fileOpenSSLCipher'))) { // Decrypt
|
// if (!empty($file->getAttribute('fileOpenSSLCipher'))) { // Decrypt
|
||||||
$source = OpenSSL::decrypt(
|
// $source = OpenSSL::decrypt(
|
||||||
$source,
|
// $source,
|
||||||
$file->getAttribute('fileOpenSSLCipher'),
|
// $file->getAttribute('fileOpenSSLCipher'),
|
||||||
$request->getServer('_APP_OPENSSL_KEY_V'.$file->getAttribute('fileOpenSSLVersion')),
|
// $request->getServer('_APP_OPENSSL_KEY_V'.$file->getAttribute('fileOpenSSLVersion')),
|
||||||
0,
|
// 0,
|
||||||
hex2bin($file->getAttribute('fileOpenSSLIV')),
|
// hex2bin($file->getAttribute('fileOpenSSLIV')),
|
||||||
hex2bin($file->getAttribute('fileOpenSSLTag'))
|
// hex2bin($file->getAttribute('fileOpenSSLTag'))
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
$source = $compressor->decompress($source);
|
// $source = $compressor->decompress($source);
|
||||||
|
|
||||||
$antiVirus = new Network('clamav', 3310);
|
// $antiVirus = new Network('clamav', 3310);
|
||||||
|
|
||||||
//var_dump($antiVirus->ping());
|
// //var_dump($antiVirus->ping());
|
||||||
//var_dump($antiVirus->version());
|
// //var_dump($antiVirus->version());
|
||||||
//var_dump($antiVirus->fileScan('/storage/uploads/app-1/5/9/f/e/59fecaed49645.pdf'));
|
// //var_dump($antiVirus->fileScan('/storage/uploads/app-1/5/9/f/e/59fecaed49645.pdf'));
|
||||||
|
|
||||||
//$response->json($antiVirus->continueScan($device->getRoot()));
|
// //$response->json($antiVirus->continueScan($device->getRoot()));
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
|
|
|
@ -31,7 +31,7 @@ $layout
|
||||||
->setParam('env', $utopia->getEnv())
|
->setParam('env', $utopia->getEnv())
|
||||||
;
|
;
|
||||||
|
|
||||||
$utopia->shutdown(function () use ($utopia, $response, $request, $layout) {
|
$utopia->init(function () use ($utopia, $response, $request, $layout) {
|
||||||
$time = (60 * 60 * 24 * 45); // 45 days cache
|
$time = (60 * 60 * 24 * 45); // 45 days cache
|
||||||
$isDev = (\Utopia\App::ENV_TYPE_DEVELOPMENT == Config::getParam('env'));
|
$isDev = (\Utopia\App::ENV_TYPE_DEVELOPMENT == Config::getParam('env'));
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,10 @@ $utopia->get('/console/webhooks')
|
||||||
->action(function () use ($layout) {
|
->action(function () use ($layout) {
|
||||||
$page = new View(__DIR__.'/../../views/console/webhooks/index.phtml');
|
$page = new View(__DIR__.'/../../views/console/webhooks/index.phtml');
|
||||||
|
|
||||||
|
$page
|
||||||
|
->setParam('events', Config::getParam('events', []))
|
||||||
|
;
|
||||||
|
|
||||||
$layout
|
$layout
|
||||||
->setParam('title', APP_NAME.' - Webhooks')
|
->setParam('title', APP_NAME.' - Webhooks')
|
||||||
->setParam('body', $page);
|
->setParam('body', $page);
|
||||||
|
@ -183,7 +187,7 @@ $utopia->get('/console/database/collection')
|
||||||
->label('permission', 'public')
|
->label('permission', 'public')
|
||||||
->label('scope', 'console')
|
->label('scope', 'console')
|
||||||
->param('id', '', function () { return new UID(); }, 'Collection unique ID.')
|
->param('id', '', function () { return new UID(); }, 'Collection unique ID.')
|
||||||
->action(function ($id) use ($layout, $projectDB) {
|
->action(function ($id) use ($response, $layout, $projectDB) {
|
||||||
Authorization::disable();
|
Authorization::disable();
|
||||||
$collection = $projectDB->getDocument($id, false);
|
$collection = $projectDB->getDocument($id, false);
|
||||||
Authorization::reset();
|
Authorization::reset();
|
||||||
|
@ -200,7 +204,15 @@ $utopia->get('/console/database/collection')
|
||||||
|
|
||||||
$layout
|
$layout
|
||||||
->setParam('title', APP_NAME.' - Database Collection')
|
->setParam('title', APP_NAME.' - Database Collection')
|
||||||
->setParam('body', $page);
|
->setParam('body', $page)
|
||||||
|
;
|
||||||
|
|
||||||
|
$response
|
||||||
|
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
|
||||||
|
->addHeader('Expires', 0)
|
||||||
|
->addHeader('Pragma', 'no-cache')
|
||||||
|
;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$utopia->get('/console/database/document')
|
$utopia->get('/console/database/document')
|
||||||
|
|
|
@ -54,6 +54,7 @@ $response = new Response();
|
||||||
/*
|
/*
|
||||||
* ENV vars
|
* ENV vars
|
||||||
*/
|
*/
|
||||||
|
Config::load('events', __DIR__.'/../app/config/events.php');
|
||||||
Config::load('providers', __DIR__.'/../app/config/providers.php');
|
Config::load('providers', __DIR__.'/../app/config/providers.php');
|
||||||
Config::load('platforms', __DIR__.'/../app/config/platforms.php');
|
Config::load('platforms', __DIR__.'/../app/config/platforms.php');
|
||||||
Config::load('locales', __DIR__.'/../app/config/locales.php');
|
Config::load('locales', __DIR__.'/../app/config/locales.php');
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
## 0.2.2
|
||||||
|
|
||||||
|
- Fixed an error that happend when the OAuth session creation request was sent before any other API call
|
||||||
|
- Fixed a bug in the Avatars service where location URL generation had syntax error
|
||||||
|
|
||||||
## 0.2.1
|
## 0.2.1
|
||||||
|
|
||||||
- Fixed callback scheme
|
- Fixed callback scheme
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite)
|
[![pub package](https://img.shields.io/pub/v/appwrite.svg)](https://pub.dartlang.org/packages/appwrite)
|
||||||
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1)
|
![License](https://img.shields.io/github/license/appwrite/sdk-for-flutter.svg?v=1)
|
||||||
![Version](https://img.shields.io/badge/api%20version-0.6.0-blue.svg?v=1)
|
![Version](https://img.shields.io/badge/api%20version-0.6.1-blue.svg?v=1)
|
||||||
|
|
||||||
**This SDK is compatible with Appwrite server version 0.6.0. For older versions, please check previous releases.**
|
**This SDK is compatible with Appwrite server version 0.6.1. For older versions, please check previous releases.**
|
||||||
|
|
||||||
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way.
|
||||||
Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
Use the Flutter SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools.
|
||||||
|
@ -20,7 +20,7 @@ Add this to your package's `pubspec.yaml` file:
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
dependencies:
|
dependencies:
|
||||||
appwrite: ^0.2.1
|
appwrite: ^0.2.2
|
||||||
```
|
```
|
||||||
|
|
||||||
You can install packages from the command line:
|
You can install packages from the command line:
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Client {
|
||||||
Map<String, String> headers;
|
Map<String, String> headers;
|
||||||
Map<String, String> config;
|
Map<String, String> config;
|
||||||
bool selfSigned;
|
bool selfSigned;
|
||||||
bool init = false;
|
bool initialized = false;
|
||||||
Dio http;
|
Dio http;
|
||||||
PersistCookieJar cookieJar;
|
PersistCookieJar cookieJar;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class Client {
|
||||||
|
|
||||||
this.headers = {
|
this.headers = {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'x-sdk-version': 'appwrite:dart:0.2.1',
|
'x-sdk-version': 'appwrite:dart:0.2.2',
|
||||||
};
|
};
|
||||||
|
|
||||||
this.config = {};
|
this.config = {};
|
||||||
|
@ -76,6 +76,22 @@ class Client {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future init() async {
|
||||||
|
if(!initialized) {
|
||||||
|
final Directory cookieDir = await _getCookiePath();
|
||||||
|
|
||||||
|
cookieJar = new PersistCookieJar(dir:cookieDir.path);
|
||||||
|
|
||||||
|
this.http.options.baseUrl = this.endPoint;
|
||||||
|
this.http.options.validateStatus = (status) => status < 400;
|
||||||
|
this.http.interceptors.add(CookieManager(cookieJar));
|
||||||
|
|
||||||
|
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
||||||
|
|
||||||
|
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) async {
|
Future<Response> call(HttpMethod method, {String path = '', Map<String, String> headers = const {}, Map<String, dynamic> params = const {}}) async {
|
||||||
if(selfSigned) {
|
if(selfSigned) {
|
||||||
// Allow self signed requests
|
// Allow self signed requests
|
||||||
|
@ -85,21 +101,7 @@ class Client {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!init) {
|
await this.init();
|
||||||
final Directory cookieDir = await _getCookiePath();
|
|
||||||
|
|
||||||
cookieJar = new PersistCookieJar(dir:cookieDir.path);
|
|
||||||
|
|
||||||
this.http.options.baseUrl = this.endPoint;
|
|
||||||
this.http.options.validateStatus = (status) => status < 400;
|
|
||||||
this.http.interceptors.add(CookieManager(cookieJar));
|
|
||||||
|
|
||||||
PackageInfo packageInfo = await PackageInfo.fromPlatform();
|
|
||||||
|
|
||||||
addHeader('Origin', 'appwrite-' + type + '://' + packageInfo.packageName);
|
|
||||||
|
|
||||||
init = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Origin is hardcoded for testing
|
// Origin is hardcoded for testing
|
||||||
Options options = Options(
|
Options options = Options(
|
||||||
|
|
|
@ -325,9 +325,10 @@ class Account extends Service {
|
||||||
return FlutterWebAuth.authenticate(
|
return FlutterWebAuth.authenticate(
|
||||||
url: url.toString(),
|
url: url.toString(),
|
||||||
callbackUrlScheme: "appwrite-callback-" + client.config['project']
|
callbackUrlScheme: "appwrite-callback-" + client.config['project']
|
||||||
).then((value) {
|
).then((value) async {
|
||||||
Uri url = Uri.parse(value);
|
Uri url = Uri.parse(value);
|
||||||
List<Cookie> cookies = [new Cookie(url.queryParameters['key'], url.queryParameters['secret'])];
|
List<Cookie> cookies = [new Cookie(url.queryParameters['key'], url.queryParameters['secret'])];
|
||||||
|
await client.init();
|
||||||
client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies);
|
client.cookieJar.saveFromResponse(Uri.parse(client.endPoint), cookies);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,14 +51,14 @@ class Avatars extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get Favicon
|
/// Get Favicon
|
||||||
|
@ -75,14 +75,14 @@ class Avatars extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get Country Flag
|
/// Get Country Flag
|
||||||
|
@ -102,14 +102,14 @@ class Avatars extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get Image from URL
|
/// Get Image from URL
|
||||||
|
@ -130,14 +130,14 @@ class Avatars extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get QR Code
|
/// Get QR Code
|
||||||
|
@ -157,13 +157,13 @@ class Avatars extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -125,14 +125,14 @@ class Storage extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get File Preview
|
/// Get File Preview
|
||||||
|
@ -155,14 +155,14 @@ class Storage extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get File for View
|
/// Get File for View
|
||||||
|
@ -179,13 +179,13 @@ class Storage extends Service {
|
||||||
};
|
};
|
||||||
|
|
||||||
Uri endpoint = Uri.parse(client.endPoint);
|
Uri endpoint = Uri.parse(client.endPoint);
|
||||||
Uri url = new Uri(scheme: endpoint.scheme,
|
Uri location = new Uri(scheme: endpoint.scheme,
|
||||||
host: endpoint.host,
|
host: endpoint.host,
|
||||||
port: endpoint.port,
|
port: endpoint.port,
|
||||||
path: endpoint.path + path,
|
path: endpoint.path + path,
|
||||||
queryParameters:params,
|
queryParameters:params,
|
||||||
);
|
);
|
||||||
|
|
||||||
return url.toString();
|
return location.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
name: appwrite
|
name: appwrite
|
||||||
version: 0.2.1
|
version: 0.2.2
|
||||||
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
|
description: Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API
|
||||||
homepage: https://appwrite.io
|
homepage: https://appwrite.io
|
||||||
repository: https://github.com/appwrite/sdk-for-flutter
|
repository: https://github.com/appwrite/sdk-for-flutter
|
||||||
|
|
|
@ -1,26 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$events = [
|
$events = array_keys($this->getParam('events', []));
|
||||||
'database.collections.create',
|
|
||||||
'database.collections.update',
|
|
||||||
'database.collections.delete',
|
|
||||||
'database.documents.create',
|
|
||||||
'database.documents.update',
|
|
||||||
'database.documents.delete',
|
|
||||||
'storage.files.create',
|
|
||||||
'storage.files.update',
|
|
||||||
'storage.files.delete',
|
|
||||||
// 'auth.register',
|
|
||||||
// 'auth.confirm',
|
|
||||||
// 'auth.login',
|
|
||||||
// 'auth.logout',
|
|
||||||
'account.create',
|
|
||||||
'account.update.email',
|
|
||||||
'account.update.name',
|
|
||||||
'account.update.password',
|
|
||||||
'account.update.prefs',
|
|
||||||
'account.delete',
|
|
||||||
];
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="cover margin-bottom-large">
|
<div class="cover margin-bottom-large">
|
||||||
|
|
12
build.sh
12
build.sh
|
@ -3,6 +3,18 @@
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
|
if [ -z "$1" ]
|
||||||
|
then
|
||||||
|
echo "Missing tag number"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$2" ]
|
||||||
|
then
|
||||||
|
echo "Missing version number"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Updating git repository $1 / $2"
|
echo "Updating git repository $1 / $2"
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
|
16
composer.lock
generated
16
composer.lock
generated
|
@ -485,12 +485,12 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/guzzle/guzzle.git",
|
"url": "https://github.com/guzzle/guzzle.git",
|
||||||
"reference": "c8162bee934111d42b1db4869c09fb58926074c7"
|
"reference": "0d137e94480b275aadd1f2536a76d91cf580711c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/c8162bee934111d42b1db4869c09fb58926074c7",
|
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/0d137e94480b275aadd1f2536a76d91cf580711c",
|
||||||
"reference": "c8162bee934111d42b1db4869c09fb58926074c7",
|
"reference": "0d137e94480b275aadd1f2536a76d91cf580711c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -498,7 +498,7 @@
|
||||||
"guzzlehttp/promises": "^1.0",
|
"guzzlehttp/promises": "^1.0",
|
||||||
"guzzlehttp/psr7": "^1.6.1",
|
"guzzlehttp/psr7": "^1.6.1",
|
||||||
"php": ">=5.5",
|
"php": ">=5.5",
|
||||||
"symfony/polyfill-intl-idn": "^1.11"
|
"symfony/polyfill-intl-idn": "1.17.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
@ -544,7 +544,7 @@
|
||||||
"rest",
|
"rest",
|
||||||
"web service"
|
"web service"
|
||||||
],
|
],
|
||||||
"time": "2020-05-19T12:55:02+00:00"
|
"time": "2020-05-23T18:58:46+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/promises",
|
"name": "guzzlehttp/promises",
|
||||||
|
@ -1141,7 +1141,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-intl-idn",
|
"name": "symfony/polyfill-intl-idn",
|
||||||
"version": "dev-master",
|
"version": "v1.17.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||||
|
@ -1745,7 +1745,7 @@
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator",
|
"url": "https://github.com/appwrite/sdk-generator",
|
||||||
"reference": "e889aa5764f6cca683b5ccd83eed2e4632173937"
|
"reference": "69f8cfabf7f40cb9fb7198cdd9770afdd030a88a"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
@ -1775,7 +1775,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"time": "2020-05-23T14:30:05+00:00"
|
"time": "2020-05-24T05:26:35+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/instantiator",
|
"name": "doctrine/instantiator",
|
||||||
|
|
|
@ -107,12 +107,6 @@ http {
|
||||||
add_header Cache-Control "public";
|
add_header Cache-Control "public";
|
||||||
}
|
}
|
||||||
|
|
||||||
location /proxy.html {
|
|
||||||
expires 1y;
|
|
||||||
access_log off;
|
|
||||||
add_header Cache-Control "public";
|
|
||||||
}
|
|
||||||
|
|
||||||
#error_page 404 /404.html;
|
#error_page 404 /404.html;
|
||||||
|
|
||||||
# redirect server error pages to the static page /50x.html
|
# redirect server error pages to the static page /50x.html
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
## 0.1.1
|
|
||||||
|
|
||||||
- Updated flutter_web_auth version
|
|
||||||
|
|
||||||
## 0.1.0
|
|
||||||
|
|
||||||
- Added examples file
|
|
||||||
- Some minor style fixes
|
|
||||||
|
|
||||||
## 0.0.14
|
|
||||||
|
|
||||||
- Using MultipartFile for file uploads
|
|
||||||
|
|
||||||
## 0.0.13
|
|
||||||
|
|
||||||
- Fix for file upload method
|
|
||||||
|
|
||||||
## 0.0.12
|
|
||||||
|
|
||||||
- Added file upload support for storage service
|
|
||||||
|
|
||||||
## 0.0.11
|
|
||||||
|
|
||||||
- Added integration with web auth plugin to support Appwrite OAuth API
|
|
||||||
|
|
||||||
## 0.0.9
|
|
||||||
|
|
||||||
- Updated deafult params
|
|
||||||
|
|
||||||
## 0.0.8
|
|
||||||
|
|
||||||
- Fixed compilation error in Client class
|
|
||||||
- Shorter description for package
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
## 0.2.2
|
||||||
|
|
||||||
|
- Fixed an error that happend when the OAuth session creation request was sent before any other API call
|
||||||
|
- Fixed a bug in the Avatars service where location URL generation had syntax error
|
||||||
|
|
||||||
## 0.2.1
|
## 0.2.1
|
||||||
|
|
||||||
- Fixed callback scheme
|
- Fixed callback scheme
|
||||||
|
|
|
@ -20,19 +20,23 @@ This is your server private secret key that is used to encrypt all sensitive dat
|
||||||
|
|
||||||
Maximun file size allowed for file upload. The deafult value is 100MB limitation. You should pass your size limit value in bytes.
|
Maximun file size allowed for file upload. The deafult value is 100MB limitation. You should pass your size limit value in bytes.
|
||||||
|
|
||||||
|
### _APP_STORAGE_ANTIVIRUS
|
||||||
|
|
||||||
|
This variable allows you to disable the internal anti-virus scans. By default, this value is set to 'enabled' to cancel the scans, set the value to 'disabled'. When disabled, it's recommended to turn off the ClamAV container for better resource usage.
|
||||||
|
|
||||||
### _APP_CONSOLE_WHITELIST_EMAILS
|
### _APP_CONSOLE_WHITELIST_EMAILS
|
||||||
|
|
||||||
This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.
|
This option allows you to limit creation of users to Appwrite console. This option is very useful for small teams or sole developers. To enable it, pass a list of allowed email addresses separated by a comma.
|
||||||
|
|
||||||
### _APP_CONSOLE_WHITELIST_DOMAINS
|
### _APP_CONSOLE_WHITELIST_DOMAINS
|
||||||
|
|
||||||
This option allows you to restrict access to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.
|
This option allows you to limit creation of users to Appwrite console for users sharing the same email domains. This option is very useful for team working with company emails domain.
|
||||||
|
|
||||||
To enable this option, pass a list of allowed email domains separated by a comma.
|
To enable this option, pass a list of allowed email domains separated by a comma.
|
||||||
|
|
||||||
### _APP_CONSOLE_WHITELIST_IPS
|
### _APP_CONSOLE_WHITELIST_IPS
|
||||||
|
|
||||||
This last option allows you to restrict access to Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.
|
This last option allows you to limit creation of users in Appwrite console for users sharing the same set of IP addresses. This option is very useful for team working with a VPN service or a company IP.
|
||||||
|
|
||||||
To enable/activate this option, pass a list of allowed IP addresses separated by a comma.
|
To enable/activate this option, pass a list of allowed IP addresses separated by a comma.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue