Skip to content

Commit f1a9c75

Browse files
committed
Use consistent placeholder format
1 parent 785bac2 commit f1a9c75

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

src/routes/docs/products/storage/upload-download/+page.markdoc

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can also upload files programmatically using our SDKs:
2525
const storage = new Storage(client);
2626

2727
const promise = storage.createFile(
28-
'[BUCKET_ID]',
28+
'<BUCKET_ID>',
2929
ID.unique(),
3030
document.getElementById('uploader').files[0]
3131
);
@@ -50,11 +50,11 @@ You can also upload files programmatically using our SDKs:
5050

5151
// If running in a browser environment, you can use File directly
5252
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);
5454

5555
// If running in Node.js, use InputFile
5656
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);
5858
```
5959

6060
```client-flutter
@@ -68,7 +68,7 @@ You can also upload files programmatically using our SDKs:
6868
final storage = Storage(client);
6969

7070
final file = await storage.createFile(
71-
bucketId: '[BUCKET_ID]',
71+
bucketId: '<BUCKET_ID>',
7272
fileId: ID.unique(),
7373
file: InputFile.fromPath(path: './path-to-files/image.jpg', filename: 'image.jpg'),
7474
);
@@ -87,7 +87,7 @@ You can also upload files programmatically using our SDKs:
8787
val storage = Storage(client)
8888

8989
val file = storage.createFile(
90-
bucketId = "[BUCKET_ID]",
90+
bucketId = "<BUCKET_ID>",
9191
fileId = ID.unique(),
9292
file = File("./path-to-files/image.jpg"),
9393
)
@@ -132,7 +132,7 @@ You can also upload files programmatically using our SDKs:
132132
let storage = Storage(client)
133133

134134
let file = try await storage.createFile(
135-
bucketId: "[BUCKET_ID]",
135+
bucketId: "<BUCKET_ID>",
136136
fileId: ID.unique(),
137137
file: InputFile.fromBuffer(yourByteBuffer,
138138
filename: "image.jpg",
@@ -151,7 +151,7 @@ You can also upload files programmatically using our SDKs:
151151
--cec8e8123c05ba25
152152
Content-Disposition: form-data; name="operations"
153153

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 } }
155155
--cec8e8123c05ba25
156156
Content-Disposition: form-data; name="map"
157157

@@ -185,7 +185,7 @@ For example, for the input tag `<input type="file" id="uploader">`, you would ca
185185

186186
```js
187187
const promise = storage.createFile(
188-
'[BUCKET_ID]',
188+
'<BUCKET_ID>',
189189
ID.unique(),
190190
document.getElementById('uploader').files[0]
191191
);
@@ -391,7 +391,7 @@ client
391391
.setProject('<PROJECT_ID>') // Your project ID
392392
;
393393

394-
const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]');
394+
const promise = storage.getFile('<BUCKET_ID>', '[FILE_ID]');
395395

396396
promise.then(function (response) {
397397
console.log(response); // Success
@@ -412,7 +412,7 @@ void main() { // Init SDK
412412
;
413413
// downloading file
414414
Future result = storage.getFile(
415-
bucketId: '[BUCKET_ID]',
415+
bucketId: '<BUCKET_ID>',
416416
fileId: '[FILE_ID]',
417417
).then((bytes) {
418418
final file = File('path_to_file/filename.ext');
@@ -425,7 +425,7 @@ void main() { // Init SDK
425425
//displaying image preview
426426
FutureBuilder(
427427
future: storage.getFile(
428-
bucketId: '[BUCKET_ID]',
428+
bucketId: '<BUCKET_ID>',
429429
fileId: '[FILE_ID]',
430430
), //works for both public file and private file, for private files you need to be logged in
431431
builder: (context, snapshot) {
@@ -448,7 +448,7 @@ func main() async throws {
448448
let storage = Storage(client)
449449

450450
let byteBuffer = try await storage.getFile(
451-
bucketId: "[BUCKET_ID]",
451+
bucketId: "<BUCKET_ID>",
452452
fileId: "[FILE_ID]"
453453
)
454454

@@ -475,7 +475,7 @@ class MainActivity : AppCompatActivity() {
475475
val storage = Storage(client)
476476

477477
val result = storage.getFile(
478-
bucketId = "[BUCKET_ID]",
478+
bucketId = "<BUCKET_ID>",
479479
fileId = "[FILE_ID]"
480480
)
481481
println(result); // Resource URL
@@ -491,7 +491,7 @@ const client = new Client()
491491

492492
const storage = new Storage(client);
493493

494-
const promise = storage.getFile('[BUCKET_ID]', '[FILE_ID]');
494+
const promise = storage.getFile('<BUCKET_ID>', '[FILE_ID]');
495495

496496
promise.then(function (response) {
497497
console.log(response); // Success
@@ -517,7 +517,7 @@ client
517517
.setProject('<PROJECT_ID>') // Your project ID
518518
;
519519

520-
const result = storage.getFileDownload('[BUCKET_ID]', '[FILE_ID]');
520+
const result = storage.getFileDownload('<BUCKET_ID>', '[FILE_ID]');
521521

522522
console.log(result); // Resource URL
523523
```
@@ -534,7 +534,7 @@ void main() { // Init SDK
534534
;
535535
// downloading file
536536
Future result = storage.getFileDownload(
537-
bucketId: '[BUCKET_ID]',
537+
bucketId: '<BUCKET_ID>',
538538
fileId: '[FILE_ID]',
539539
).then((bytes) {
540540
final file = File('path_to_file/filename.ext');
@@ -547,7 +547,7 @@ void main() { // Init SDK
547547
//displaying image preview
548548
FutureBuilder(
549549
future: storage.getFileDownload(
550-
bucketId: '[BUCKET_ID]',
550+
bucketId: '<BUCKET_ID>',
551551
fileId: '[FILE_ID]',
552552
), //works for both public file and private file, for private files you need to be logged in
553553
builder: (context, snapshot) {
@@ -568,7 +568,7 @@ func main() async throws {
568568
.setProject("<PROJECT_ID>") // Your project ID
569569
let storage = Storage(client)
570570
let byteBuffer = try await storage.getFileDownload(
571-
bucketId: "[BUCKET_ID]",
571+
bucketId: "<BUCKET_ID>",
572572
fileId: "[FILE_ID]"
573573
)
574574

@@ -595,7 +595,7 @@ class MainActivity : AppCompatActivity() {
595595
val storage = Storage(client)
596596

597597
val result = storage.getFileDownload(
598-
bucketId = "[BUCKET_ID]",
598+
bucketId = "<BUCKET_ID>",
599599
fileId = "[FILE_ID]"
600600
)
601601
println(result); // Resource URL
@@ -633,7 +633,7 @@ client
633633
.setProject('<PROJECT_ID>') // Your project ID
634634
;
635635

636-
const result = storage.getFilePreview('[BUCKET_ID]', '[FILE_ID]');
636+
const result = storage.getFilePreview('<BUCKET_ID>', '[FILE_ID]');
637637

638638
console.log(result); // Resource URL
639639
```
@@ -650,7 +650,7 @@ void main() { // Init SDK
650650
;
651651
// downloading file
652652
Future result = storage.getFilePreview(
653-
bucketId: '[BUCKET_ID]',
653+
bucketId: '<BUCKET_ID>',
654654
fileId: '[FILE_ID]',
655655
).then((bytes) {
656656
final file = File('path_to_file/filename.ext');
@@ -663,7 +663,7 @@ void main() { // Init SDK
663663
//displaying image preview
664664
FutureBuilder(
665665
future: storage.getFilePreview(
666-
bucketId: '[BUCKET_ID]',
666+
bucketId: '<BUCKET_ID>',
667667
fileId: '[FILE_ID]',
668668
), //works for both public file and private file, for private files you need to be logged in
669669
builder: (context, snapshot) {
@@ -684,7 +684,7 @@ func main() async throws {
684684
.setProject("<PROJECT_ID>") // Your project ID
685685
let storage = Storage(client)
686686
let byteBuffer = try await storage.getFilePreview(
687-
bucketId: "[BUCKET_ID]",
687+
bucketId: "<BUCKET_ID>",
688688
fileId: "[FILE_ID]"
689689
)
690690

@@ -711,7 +711,7 @@ class MainActivity : AppCompatActivity() {
711711
val storage = Storage(client)
712712

713713
val result = storage.getFilePreview(
714-
bucketId = "[BUCKET_ID]",
714+
bucketId = "<BUCKET_ID>",
715715
fileId = "[FILE_ID]"
716716
)
717717
println(result); // Resource URL
@@ -757,7 +757,7 @@ client
757757
.setProject('<PROJECT_ID>') // Your project ID
758758
;
759759

760-
const result = storage.getFileView('[BUCKET_ID]', '[FILE_ID]');
760+
const result = storage.getFileView('<BUCKET_ID>', '[FILE_ID]');
761761

762762
console.log(result); // Resource URL
763763
```
@@ -774,7 +774,7 @@ void main() { // Init SDK
774774
;
775775
// downloading file
776776
Future result = storage.getFileView(
777-
bucketId: '[BUCKET_ID]',
777+
bucketId: '<BUCKET_ID>',
778778
fileId: '[FILE_ID]',
779779
).then((bytes) {
780780
final file = File('path_to_file/filename.ext');
@@ -787,7 +787,7 @@ void main() { // Init SDK
787787
//displaying image preview
788788
FutureBuilder(
789789
future: storage.getFileView(
790-
bucketId: '[BUCKET_ID]',
790+
bucketId: '<BUCKET_ID>',
791791
fileId: '[FILE_ID]',
792792
), //works for both public file and private file, for private files you need to be logged in
793793
builder: (context, snapshot) {
@@ -808,7 +808,7 @@ func main() async throws {
808808
.setProject("<PROJECT_ID>") // Your project ID
809809
let storage = Storage(client)
810810
let byteBuffer = try await storage.getFileView(
811-
bucketId: "[BUCKET_ID]",
811+
bucketId: "<BUCKET_ID>",
812812
fileId: "[FILE_ID]"
813813
)
814814

@@ -835,7 +835,7 @@ class MainActivity : AppCompatActivity() {
835835
val storage = Storage(client)
836836

837837
val result = storage.getFileView(
838-
bucketId = "[BUCKET_ID]",
838+
bucketId = "<BUCKET_ID>",
839839
fileId = "[FILE_ID]"
840840
)
841841
println(result); // Resource URL

0 commit comments

Comments
 (0)