diff --git a/docs/examples/0.14.x/client-android/java/storage/create-file.md b/docs/examples/0.14.x/client-android/java/storage/create-file.md index bc1df1a5a6..3b7099e216 100644 --- a/docs/examples/0.14.x/client-android/java/storage/create-file.md +++ b/docs/examples/0.14.x/client-android/java/storage/create-file.md @@ -21,7 +21,7 @@ public class MainActivity extends AppCompatActivity { storage.createFile( "[BUCKET_ID]", "[FILE_ID]", - File("./path-to-files/image.jpg"), + File("file.png"), new Continuation() { @NotNull @Override diff --git a/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md b/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md index 437bdeb395..c5cc6a3b24 100644 --- a/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md +++ b/docs/examples/0.14.x/client-android/kotlin/storage/create-file.md @@ -20,7 +20,7 @@ class MainActivity : AppCompatActivity() { val response = storage.createFile( bucketId = "[BUCKET_ID]", fileId = "[FILE_ID]", - file = File("./path-to-files/image.jpg"), + file = File("file.png"), ) val json = response.body?.string() } diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md index 6db35ea9d4..f908d11099 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-browser.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getBrowser( + code: 'aa', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getBrowser( code: 'aa', diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md index d546050bce..0c6ff01d19 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-credit-card.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getCreditCard( + code: 'amex', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getCreditCard( code: 'amex', diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md index 3d755519e3..6df7c2dfbf 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-favicon.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getFavicon( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getFavicon( url: 'https://example.com', diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md index 692b6fabcd..fa5b60d767 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-flag.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getFlag( + code: 'af', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getFlag( code: 'af', diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md index 1c1658eebe..219d160d8d 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-image.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getImage( + url: 'https://example.com', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getImage( url: 'https://example.com', diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md index 8e2dbb3036..cd1b1f7e9c 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-initials.md @@ -8,9 +8,17 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getInitials( + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getInitials( ), //works for both public file and private file, for private files you need to be logged in diff --git a/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md b/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md index ca8d180464..df6ebd3c8c 100644 --- a/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md +++ b/docs/examples/0.14.x/client-flutter/examples/avatars/get-q-r.md @@ -8,9 +8,18 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = avatars.getQR( + text: '[TEXT]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: avatars.getQR( text: '[TEXT]', diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md index eb55a619f3..ea3f2abfc8 100644 --- a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-download.md @@ -8,9 +8,19 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = storage.getFileDownload( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: storage.getFileDownload( bucketId: '[BUCKET_ID]', diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md index 3bfde7ebfa..1a0fca2911 100644 --- a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-preview.md @@ -8,9 +8,19 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = storage.getFilePreview( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: storage.getFilePreview( bucketId: '[BUCKET_ID]', diff --git a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md index 4e903d7f5e..46051338eb 100644 --- a/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md +++ b/docs/examples/0.14.x/client-flutter/examples/storage/get-file-view.md @@ -8,9 +8,19 @@ void main() { // Init SDK .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint .setProject('5df5acd0d48c2') // Your project ID ; + // downloading file + Future result = storage.getFileView( + bucketId: '[BUCKET_ID]', + fileId: '[FILE_ID]', + ).then((bytes) { + final file = File('path_to_file/filename.ext'); + file.writeAsBytesSync(bytes) + }).catchError((error) { + print(error.response); + }) } -//displaying image +//displaying image preview FutureBuilder( future: storage.getFileView( bucketId: '[BUCKET_ID]', diff --git a/docs/examples/0.14.x/client-web/examples/account/delete.md b/docs/examples/0.14.x/client-web/examples/account/delete.md deleted file mode 100644 index ad281d7a3c..0000000000 --- a/docs/examples/0.14.x/client-web/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.14.x/console-web/examples/account/delete.md b/docs/examples/0.14.x/console-web/examples/account/delete.md deleted file mode 100644 index ad281d7a3c..0000000000 --- a/docs/examples/0.14.x/console-web/examples/account/delete.md +++ /dev/null @@ -1,14 +0,0 @@ -const sdk = new Appwrite(); - -sdk - .setEndpoint('https://[HOSTNAME_OR_IP]/v1') // Your API Endpoint - .setProject('5df5acd0d48c2') // Your project ID -; - -let promise = sdk.account.delete(); - -promise.then(function (response) { - console.log(response); // Success -}, function (error) { - console.log(error); // Failure -}); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md index c85890c71f..847a82db8c 100644 --- a/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-deno/examples/functions/create-deployment.md @@ -12,7 +12,7 @@ client ; -let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', new File([fileBlob], 'file.png'), false); +let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.14.x/server-deno/examples/storage/create-file.md b/docs/examples/0.14.x/server-deno/examples/storage/create-file.md index 66be84fdb7..d49c4e2079 100644 --- a/docs/examples/0.14.x/server-deno/examples/storage/create-file.md +++ b/docs/examples/0.14.x/server-deno/examples/storage/create-file.md @@ -12,7 +12,7 @@ client ; -let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', new File([fileBlob], 'file.png')); +let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md b/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md index 3472e349ab..1ba7bd77cd 100644 --- a/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-kotlin/java/functions/create-deployment.md @@ -11,7 +11,7 @@ public void main() { functions.createDeployment( functionId = "[FUNCTION_ID]", entrypoint = "[ENTRYPOINT]", - code = File("./path-to-files/image.jpg"), + code = File("file.png"), activate = false new Continuation() { @NotNull diff --git a/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md b/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md index 126054cb9b..0debf03fba 100644 --- a/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md +++ b/docs/examples/0.14.x/server-kotlin/java/storage/create-file.md @@ -11,7 +11,7 @@ public void main() { storage.createFile( bucketId = "[BUCKET_ID]", fileId = "[FILE_ID]", - file = File("./path-to-files/image.jpg"), + file = File("file.png"), new Continuation() { @NotNull @Override diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md index 23f97e1b78..efd3503705 100644 --- a/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-kotlin/kotlin/functions/create-deployment.md @@ -11,7 +11,7 @@ suspend fun main() { val response = functions.createDeployment( functionId = "[FUNCTION_ID]", entrypoint = "[ENTRYPOINT]", - code = File("./path-to-files/image.jpg"), + code = File("file.png"), activate = false ) val json = response.body?.string() diff --git a/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md index fa06010e0c..6b666d40a7 100644 --- a/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md +++ b/docs/examples/0.14.x/server-kotlin/kotlin/storage/create-file.md @@ -11,7 +11,7 @@ suspend fun main() { val response = storage.createFile( bucketId = "[BUCKET_ID]", fileId = "[FILE_ID]", - file = File("./path-to-files/image.jpg"), + file = File("file.png"), ) val json = response.body?.string() } \ No newline at end of file diff --git a/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md index 9032f78a4d..00717651f9 100644 --- a/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-nodejs/examples/functions/create-deployment.md @@ -12,7 +12,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', fs.createReadStream(__dirname + '/file.png'), false); +let promise = functions.createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md b/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md index a3e791144a..185a9147c4 100644 --- a/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md +++ b/docs/examples/0.14.x/server-nodejs/examples/storage/create-file.md @@ -12,7 +12,7 @@ client .setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key ; -let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', fs.createReadStream(__dirname + '/file.png')); +let promise = storage.createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); promise.then(function (response) { console.log(response); diff --git a/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md index 1f3a6ccb91..4df1ad86f0 100644 --- a/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-php/examples/functions/create-deployment.md @@ -13,4 +13,4 @@ $client $functions = new Functions($client); -$result = $functions->createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', new \CURLFile('/path/to/file.png', 'image/png', 'file.png'), false); \ No newline at end of file +$result = $functions->createDeployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', false); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-php/examples/storage/create-file.md b/docs/examples/0.14.x/server-php/examples/storage/create-file.md index d41d9c03ec..883f565577 100644 --- a/docs/examples/0.14.x/server-php/examples/storage/create-file.md +++ b/docs/examples/0.14.x/server-php/examples/storage/create-file.md @@ -13,4 +13,4 @@ $client $storage = new Storage($client); -$result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', new \CURLFile('/path/to/file.png', 'image/png', 'file.png')); \ No newline at end of file +$result = $storage->createFile('[BUCKET_ID]', '[FILE_ID]', 'file.png'); \ No newline at end of file diff --git a/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md index 80f6f7b203..715c20ccf0 100644 --- a/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-python/examples/functions/create-deployment.md @@ -11,4 +11,4 @@ client = Client() functions = Functions(client) -result = functions.create_deployment('[FUNCTION_ID]', '[ENTRYPOINT]', open('/path/to/file.png', 'rb'), False) +result = functions.create_deployment('[FUNCTION_ID]', '[ENTRYPOINT]', 'file.png', False) diff --git a/docs/examples/0.14.x/server-python/examples/storage/create-file.md b/docs/examples/0.14.x/server-python/examples/storage/create-file.md index 8603ef2f76..2ccb023a03 100644 --- a/docs/examples/0.14.x/server-python/examples/storage/create-file.md +++ b/docs/examples/0.14.x/server-python/examples/storage/create-file.md @@ -11,4 +11,4 @@ client = Client() storage = Storage(client) -result = storage.create_file('[BUCKET_ID]', '[FILE_ID]', open('/path/to/file.png', 'rb')) +result = storage.create_file('[BUCKET_ID]', '[FILE_ID]', 'file.png') diff --git a/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md b/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md index 63f83fe723..1df2a286c5 100644 --- a/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md +++ b/docs/examples/0.14.x/server-ruby/examples/functions/create-deployment.md @@ -9,6 +9,6 @@ client functions = Appwrite::Functions.new(client) -response = functions.create_deployment(function_id: '[FUNCTION_ID]', entrypoint: '[ENTRYPOINT]', code: File.new(), activate: false) +response = functions.create_deployment(function_id: '[FUNCTION_ID]', entrypoint: '[ENTRYPOINT]', code: 'dir/file.png', activate: false) puts response.inspect \ No newline at end of file diff --git a/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md b/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md index 5cb1772985..066cc51c51 100644 --- a/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md +++ b/docs/examples/0.14.x/server-ruby/examples/storage/create-file.md @@ -9,6 +9,6 @@ client storage = Appwrite::Storage.new(client) -response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: File.new()) +response = storage.create_file(bucket_id: '[BUCKET_ID]', file_id: '[FILE_ID]', file: 'dir/file.png') puts response.inspect \ No newline at end of file