@@ -146,12 +146,12 @@ You can also upload files programmatically using our SDKs:
146
146
POST /v1/storage/buckets/{bucketId}/files HTTP/1.1
147
147
Content-Type: multipart/form-data; boundary="cec8e8123c05ba25"
148
148
Content-Length: *Length of your entity body in bytes*
149
- X-Appwrite-Project: [ PROJECT_ID]
149
+ X-Appwrite-Project: < PROJECT_ID>
150
150
151
151
--cec8e8123c05ba25
152
152
Content-Disposition: form-data; name="operations"
153
153
154
- { "query": "mutation CreateFile($bucketId: String!, $fileId: String!, $file: InputFile!) { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file) { id } }", "variables": { "bucketId": "<BUCKET_ID>", "fileId": "[ FILE_ID] ", "file": null } }
154
+ { "query": "mutation CreateFile($bucketId: String!, $fileId: String!, $file: InputFile!) { storageCreateFile(bucketId: $bucketId, fileId: $fileId, file: $file) { id } }", "variables": { "bucketId": "<BUCKET_ID>", "fileId": "< FILE_ID> ", "file": null } }
155
155
--cec8e8123c05ba25
156
156
Content-Disposition: form-data; name="map"
157
157
@@ -391,7 +391,7 @@ client
391
391
.setProject('<PROJECT_ID>') // Your project ID
392
392
;
393
393
394
- const promise = storage.getFile('<BUCKET_ID>', '[ FILE_ID] ');
394
+ const promise = storage.getFile('<BUCKET_ID>', '< FILE_ID> ');
395
395
396
396
promise.then(function (response) {
397
397
console.log(response); // Success
@@ -413,7 +413,7 @@ void main() { // Init SDK
413
413
// downloading file
414
414
Future result = storage.getFile(
415
415
bucketId: '<BUCKET_ID>',
416
- fileId: '[ FILE_ID] ',
416
+ fileId: '< FILE_ID> ',
417
417
).then((bytes) {
418
418
final file = File('path_to_file/filename.ext');
419
419
file.writeAsBytesSync(bytes)
@@ -426,7 +426,7 @@ void main() { // Init SDK
426
426
FutureBuilder(
427
427
future: storage.getFile(
428
428
bucketId: '<BUCKET_ID>',
429
- fileId: '[ FILE_ID] ',
429
+ fileId: '< FILE_ID> ',
430
430
), //works for both public file and private file, for private files you need to be logged in
431
431
builder: (context, snapshot) {
432
432
return snapshot.hasData && snapshot.data != null
@@ -449,7 +449,7 @@ func main() async throws {
449
449
450
450
let byteBuffer = try await storage.getFile(
451
451
bucketId: "<BUCKET_ID>",
452
- fileId: "[ FILE_ID] "
452
+ fileId: "< FILE_ID> "
453
453
)
454
454
455
455
print(String(describing: byteBuffer)
@@ -476,7 +476,7 @@ class MainActivity : AppCompatActivity() {
476
476
477
477
val result = storage.getFile(
478
478
bucketId = "<BUCKET_ID>",
479
- fileId = "[ FILE_ID] "
479
+ fileId = "< FILE_ID> "
480
480
)
481
481
println(result); // Resource URL
482
482
}
@@ -491,7 +491,7 @@ const client = new Client()
491
491
492
492
const storage = new Storage(client);
493
493
494
- const promise = storage.getFile('<BUCKET_ID>', '[ FILE_ID] ');
494
+ const promise = storage.getFile('<BUCKET_ID>', '< FILE_ID> ');
495
495
496
496
promise.then(function (response) {
497
497
console.log(response); // Success
@@ -517,7 +517,7 @@ client
517
517
.setProject('<PROJECT_ID>') // Your project ID
518
518
;
519
519
520
- const result = storage.getFileDownload('<BUCKET_ID>', '[ FILE_ID] ');
520
+ const result = storage.getFileDownload('<BUCKET_ID>', '< FILE_ID> ');
521
521
522
522
console.log(result); // Resource URL
523
523
```
@@ -535,7 +535,7 @@ void main() { // Init SDK
535
535
// downloading file
536
536
Future result = storage.getFileDownload(
537
537
bucketId: '<BUCKET_ID>',
538
- fileId: '[ FILE_ID] ',
538
+ fileId: '< FILE_ID> ',
539
539
).then((bytes) {
540
540
final file = File('path_to_file/filename.ext');
541
541
file.writeAsBytesSync(bytes)
@@ -548,7 +548,7 @@ void main() { // Init SDK
548
548
FutureBuilder(
549
549
future: storage.getFileDownload(
550
550
bucketId: '<BUCKET_ID>',
551
- fileId: '[ FILE_ID] ',
551
+ fileId: '< FILE_ID> ',
552
552
), //works for both public file and private file, for private files you need to be logged in
553
553
builder: (context, snapshot) {
554
554
return snapshot.hasData && snapshot.data != null
@@ -569,7 +569,7 @@ func main() async throws {
569
569
let storage = Storage(client)
570
570
let byteBuffer = try await storage.getFileDownload(
571
571
bucketId: "<BUCKET_ID>",
572
- fileId: "[ FILE_ID] "
572
+ fileId: "< FILE_ID> "
573
573
)
574
574
575
575
print(String(describing: byteBuffer))
@@ -596,7 +596,7 @@ class MainActivity : AppCompatActivity() {
596
596
597
597
val result = storage.getFileDownload(
598
598
bucketId = "<BUCKET_ID>",
599
- fileId = "[ FILE_ID] "
599
+ fileId = "< FILE_ID> "
600
600
)
601
601
println(result); // Resource URL
602
602
}
@@ -633,7 +633,7 @@ client
633
633
.setProject('<PROJECT_ID>') // Your project ID
634
634
;
635
635
636
- const result = storage.getFilePreview('<BUCKET_ID>', '[ FILE_ID] ');
636
+ const result = storage.getFilePreview('<BUCKET_ID>', '< FILE_ID> ');
637
637
638
638
console.log(result); // Resource URL
639
639
```
@@ -651,7 +651,7 @@ void main() { // Init SDK
651
651
// downloading file
652
652
Future result = storage.getFilePreview(
653
653
bucketId: '<BUCKET_ID>',
654
- fileId: '[ FILE_ID] ',
654
+ fileId: '< FILE_ID> ',
655
655
).then((bytes) {
656
656
final file = File('path_to_file/filename.ext');
657
657
file.writeAsBytesSync(bytes)
@@ -664,7 +664,7 @@ void main() { // Init SDK
664
664
FutureBuilder(
665
665
future: storage.getFilePreview(
666
666
bucketId: '<BUCKET_ID>',
667
- fileId: '[ FILE_ID] ',
667
+ fileId: '< FILE_ID> ',
668
668
), //works for both public file and private file, for private files you need to be logged in
669
669
builder: (context, snapshot) {
670
670
return snapshot.hasData && snapshot.data != null
@@ -685,7 +685,7 @@ func main() async throws {
685
685
let storage = Storage(client)
686
686
let byteBuffer = try await storage.getFilePreview(
687
687
bucketId: "<BUCKET_ID>",
688
- fileId: "[ FILE_ID] "
688
+ fileId: "< FILE_ID> "
689
689
)
690
690
691
691
print(String(describing: byteBuffer))
@@ -712,7 +712,7 @@ class MainActivity : AppCompatActivity() {
712
712
713
713
val result = storage.getFilePreview(
714
714
bucketId = "<BUCKET_ID>",
715
- fileId = "[ FILE_ID] "
715
+ fileId = "< FILE_ID> "
716
716
)
717
717
println(result); // Resource URL
718
718
}
@@ -757,7 +757,7 @@ client
757
757
.setProject('<PROJECT_ID>') // Your project ID
758
758
;
759
759
760
- const result = storage.getFileView('<BUCKET_ID>', '[ FILE_ID] ');
760
+ const result = storage.getFileView('<BUCKET_ID>', '< FILE_ID> ');
761
761
762
762
console.log(result); // Resource URL
763
763
```
@@ -775,7 +775,7 @@ void main() { // Init SDK
775
775
// downloading file
776
776
Future result = storage.getFileView(
777
777
bucketId: '<BUCKET_ID>',
778
- fileId: '[ FILE_ID] ',
778
+ fileId: '< FILE_ID> ',
779
779
).then((bytes) {
780
780
final file = File('path_to_file/filename.ext');
781
781
file.writeAsBytesSync(bytes)
@@ -788,7 +788,7 @@ void main() { // Init SDK
788
788
FutureBuilder(
789
789
future: storage.getFileView(
790
790
bucketId: '<BUCKET_ID>',
791
- fileId: '[ FILE_ID] ',
791
+ fileId: '< FILE_ID> ',
792
792
), //works for both public file and private file, for private files you need to be logged in
793
793
builder: (context, snapshot) {
794
794
return snapshot.hasData && snapshot.data != null
@@ -809,7 +809,7 @@ func main() async throws {
809
809
let storage = Storage(client)
810
810
let byteBuffer = try await storage.getFileView(
811
811
bucketId: "<BUCKET_ID>",
812
- fileId: "[ FILE_ID] "
812
+ fileId: "< FILE_ID> "
813
813
)
814
814
815
815
print(String(describing: byteBuffer))
@@ -836,7 +836,7 @@ class MainActivity : AppCompatActivity() {
836
836
837
837
val result = storage.getFileView(
838
838
bucketId = "<BUCKET_ID>",
839
- fileId = "[ FILE_ID] "
839
+ fileId = "< FILE_ID> "
840
840
)
841
841
println(result); // Resource URL
842
842
}
0 commit comments