@@ -25,7 +25,7 @@ You can also upload files programmatically using our SDKs:
25
25
const storage = new Storage(client);
26
26
27
27
const promise = storage.createFile(
28
- '[ BUCKET_ID] ',
28
+ '< BUCKET_ID> ',
29
29
ID.unique(),
30
30
document.getElementById('uploader').files[0]
31
31
);
@@ -50,11 +50,11 @@ You can also upload files programmatically using our SDKs:
50
50
51
51
// If running in a browser environment, you can use File directly
52
52
const browserFile = new File(['hello'], 'hello.txt');
53
- await storage.createFile('[ BUCKET_ID] ', ID.unique(), browserFile);
53
+ await storage.createFile('< BUCKET_ID> ', ID.unique(), browserFile);
54
54
55
55
// If running in Node.js, use InputFile
56
56
const nodeFile = InputFile.fromPath('/path/to/file.jpg', 'file.jpg');
57
- await storage.createFile('[ BUCKET_ID] ', ID.unique(), nodeFile);
57
+ await storage.createFile('< BUCKET_ID> ', ID.unique(), nodeFile);
58
58
```
59
59
60
60
```client-flutter
@@ -68,7 +68,7 @@ You can also upload files programmatically using our SDKs:
68
68
final storage = Storage(client);
69
69
70
70
final file = await storage.createFile(
71
- bucketId: '[ BUCKET_ID] ',
71
+ bucketId: '< BUCKET_ID> ',
72
72
fileId: ID.unique(),
73
73
file: InputFile.fromPath(path: './path-to-files/image.jpg', filename: 'image.jpg'),
74
74
);
@@ -87,7 +87,7 @@ You can also upload files programmatically using our SDKs:
87
87
val storage = Storage(client)
88
88
89
89
val file = storage.createFile(
90
- bucketId = "[ BUCKET_ID] ",
90
+ bucketId = "< BUCKET_ID> ",
91
91
fileId = ID.unique(),
92
92
file = File("./path-to-files/image.jpg"),
93
93
)
@@ -132,7 +132,7 @@ You can also upload files programmatically using our SDKs:
132
132
let storage = Storage(client)
133
133
134
134
let file = try await storage.createFile(
135
- bucketId: "[ BUCKET_ID] ",
135
+ bucketId: "< BUCKET_ID> ",
136
136
fileId: ID.unique(),
137
137
file: InputFile.fromBuffer(yourByteBuffer,
138
138
filename: "image.jpg",
@@ -151,7 +151,7 @@ You can also upload files programmatically using our SDKs:
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
@@ -185,7 +185,7 @@ For example, for the input tag `<input type="file" id="uploader">`, you would ca
185
185
186
186
```js
187
187
const promise = storage.createFile(
188
- '[ BUCKET_ID] ',
188
+ '< BUCKET_ID> ',
189
189
ID.unique(),
190
190
document.getElementById('uploader').files[0]
191
191
);
@@ -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
@@ -412,7 +412,7 @@ void main() { // Init SDK
412
412
;
413
413
// downloading file
414
414
Future result = storage.getFile(
415
- bucketId: '[ BUCKET_ID] ',
415
+ bucketId: '< BUCKET_ID> ',
416
416
fileId: '[FILE_ID]',
417
417
).then((bytes) {
418
418
final file = File('path_to_file/filename.ext');
@@ -425,7 +425,7 @@ void main() { // Init SDK
425
425
//displaying image preview
426
426
FutureBuilder(
427
427
future: storage.getFile(
428
- bucketId: '[ BUCKET_ID] ',
428
+ bucketId: '< BUCKET_ID> ',
429
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) {
@@ -448,7 +448,7 @@ func main() async throws {
448
448
let storage = Storage(client)
449
449
450
450
let byteBuffer = try await storage.getFile(
451
- bucketId: "[ BUCKET_ID] ",
451
+ bucketId: "< BUCKET_ID> ",
452
452
fileId: "[FILE_ID]"
453
453
)
454
454
@@ -475,7 +475,7 @@ class MainActivity : AppCompatActivity() {
475
475
val storage = Storage(client)
476
476
477
477
val result = storage.getFile(
478
- bucketId = "[ BUCKET_ID] ",
478
+ bucketId = "< BUCKET_ID> ",
479
479
fileId = "[FILE_ID]"
480
480
)
481
481
println(result); // Resource URL
@@ -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
```
@@ -534,7 +534,7 @@ void main() { // Init SDK
534
534
;
535
535
// downloading file
536
536
Future result = storage.getFileDownload(
537
- bucketId: '[ BUCKET_ID] ',
537
+ bucketId: '< BUCKET_ID> ',
538
538
fileId: '[FILE_ID]',
539
539
).then((bytes) {
540
540
final file = File('path_to_file/filename.ext');
@@ -547,7 +547,7 @@ void main() { // Init SDK
547
547
//displaying image preview
548
548
FutureBuilder(
549
549
future: storage.getFileDownload(
550
- bucketId: '[ BUCKET_ID] ',
550
+ bucketId: '< BUCKET_ID> ',
551
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) {
@@ -568,7 +568,7 @@ func main() async throws {
568
568
.setProject("<PROJECT_ID>") // Your project ID
569
569
let storage = Storage(client)
570
570
let byteBuffer = try await storage.getFileDownload(
571
- bucketId: "[ BUCKET_ID] ",
571
+ bucketId: "< BUCKET_ID> ",
572
572
fileId: "[FILE_ID]"
573
573
)
574
574
@@ -595,7 +595,7 @@ class MainActivity : AppCompatActivity() {
595
595
val storage = Storage(client)
596
596
597
597
val result = storage.getFileDownload(
598
- bucketId = "[ BUCKET_ID] ",
598
+ bucketId = "< BUCKET_ID> ",
599
599
fileId = "[FILE_ID]"
600
600
)
601
601
println(result); // Resource URL
@@ -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
```
@@ -650,7 +650,7 @@ void main() { // Init SDK
650
650
;
651
651
// downloading file
652
652
Future result = storage.getFilePreview(
653
- bucketId: '[ BUCKET_ID] ',
653
+ bucketId: '< BUCKET_ID> ',
654
654
fileId: '[FILE_ID]',
655
655
).then((bytes) {
656
656
final file = File('path_to_file/filename.ext');
@@ -663,7 +663,7 @@ void main() { // Init SDK
663
663
//displaying image preview
664
664
FutureBuilder(
665
665
future: storage.getFilePreview(
666
- bucketId: '[ BUCKET_ID] ',
666
+ bucketId: '< BUCKET_ID> ',
667
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) {
@@ -684,7 +684,7 @@ func main() async throws {
684
684
.setProject("<PROJECT_ID>") // Your project ID
685
685
let storage = Storage(client)
686
686
let byteBuffer = try await storage.getFilePreview(
687
- bucketId: "[ BUCKET_ID] ",
687
+ bucketId: "< BUCKET_ID> ",
688
688
fileId: "[FILE_ID]"
689
689
)
690
690
@@ -711,7 +711,7 @@ class MainActivity : AppCompatActivity() {
711
711
val storage = Storage(client)
712
712
713
713
val result = storage.getFilePreview(
714
- bucketId = "[ BUCKET_ID] ",
714
+ bucketId = "< BUCKET_ID> ",
715
715
fileId = "[FILE_ID]"
716
716
)
717
717
println(result); // Resource URL
@@ -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
```
@@ -774,7 +774,7 @@ void main() { // Init SDK
774
774
;
775
775
// downloading file
776
776
Future result = storage.getFileView(
777
- bucketId: '[ BUCKET_ID] ',
777
+ bucketId: '< BUCKET_ID> ',
778
778
fileId: '[FILE_ID]',
779
779
).then((bytes) {
780
780
final file = File('path_to_file/filename.ext');
@@ -787,7 +787,7 @@ void main() { // Init SDK
787
787
//displaying image preview
788
788
FutureBuilder(
789
789
future: storage.getFileView(
790
- bucketId: '[ BUCKET_ID] ',
790
+ bucketId: '< BUCKET_ID> ',
791
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) {
@@ -808,7 +808,7 @@ func main() async throws {
808
808
.setProject("<PROJECT_ID>") // Your project ID
809
809
let storage = Storage(client)
810
810
let byteBuffer = try await storage.getFileView(
811
- bucketId: "[ BUCKET_ID] ",
811
+ bucketId: "< BUCKET_ID> ",
812
812
fileId: "[FILE_ID]"
813
813
)
814
814
@@ -835,7 +835,7 @@ class MainActivity : AppCompatActivity() {
835
835
val storage = Storage(client)
836
836
837
837
val result = storage.getFileView(
838
- bucketId = "[ BUCKET_ID] ",
838
+ bucketId = "< BUCKET_ID> ",
839
839
fileId = "[FILE_ID]"
840
840
)
841
841
println(result); // Resource URL
0 commit comments