Skip to content

Commit 67740f5

Browse files
committed
Fixing some typos and headers levels
1 parent fe9c40c commit 67740f5

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

src/pages/[platform]/build-a-backend/storage/download-files/index.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ Option | Type | Description |
249249

250250
<InlineFilter filters={["swift"]}>
251251
```swift
252-
let url = try await Amplify.Storage.getURL(path: .fromString("public/example/path"))
252+
let url = try await Amplify.Storage.getURL(
253+
path: .fromString("public/example/path")
254+
)
253255
print("Completed: \(url)")
254256
```
255257

@@ -563,7 +565,7 @@ try {
563565

564566
<InlineFilter filters={["swift"]}>
565567

566-
## API to download data in memory
568+
## Download to data in memory
567569

568570
You can download to in-memory buffer [Data](https://developer.apple.com/documentation/foundation/data) object with `Amplify.Storage.downloadData`:
569571

@@ -572,7 +574,9 @@ You can download to in-memory buffer [Data](https://developer.apple.com/document
572574
<Block name="Async/Await">
573575

574576
```swift
575-
let downloadTask = Amplify.Storage.downloadData(path: .fromString("public/example/path"))
577+
let downloadTask = Amplify.Storage.downloadData(
578+
path: .fromString("public/example/path")
579+
)
576580
Task {
577581
for await progress in await downloadTask.progress {
578582
print("Progress: \(progress)")
@@ -587,7 +591,9 @@ print("Completed: \(data)")
587591
<Block name="Combine">
588592

589593
```swift
590-
let downloadTask = Amplify.Storage.downloadData(path: .fromString("public/example/path"))
594+
let downloadTask = Amplify.Storage.downloadData(
595+
path: .fromString("public/example/path")
596+
)
591597
let progressSink = downloadTask
592598
.inProcessPublisher
593599
.sink { progress in
@@ -692,7 +698,7 @@ try {
692698

693699
### Download from a specified bucket
694700

695-
You can also perform an download operation to a specific bucket by providing the `bucket` option. You can pass in a string representing the target bucket's assigned name in Amplify Backend.
701+
You can also perform a download operation to a specific bucket by providing the `bucket` option. You can pass in a string representing the target bucket's assigned name in Amplify Backend.
696702

697703
<BlockSwitcher>
698704
<Block name="Java">
@@ -1147,7 +1153,7 @@ let downloadTask = Amplify.Storage.downloadData(
11471153
</Block>
11481154
</BlockSwitcher>
11491155

1150-
### Pause, resume, and cancel downloads
1156+
## Pause, resume, and cancel downloads
11511157

11521158
Calls to `downloadData` or `downloadFile` return a reference to the task that is actually performing the download.
11531159

src/pages/[platform]/build-a-backend/storage/remove-files/index.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function getStaticProps(context) {
2929
};
3030
}
3131

32-
Files can be removed from a storage bucket using the 'remove' API. If a file is protected by an identity Id, only the user who owns the file will be able to remove it.
32+
Files can be removed from a storage bucket using the `remove` API. If a file is protected by an identity Id, only the user who owns the file will be able to remove it.
3333

3434
<InlineFilter filters={["react", "angular", "javascript", "vue", "nextjs", "react-native"]}>
3535

@@ -48,9 +48,7 @@ try {
4848
console.log('Error ', error);
4949
}
5050
```
51-
</InlineFilter>
5251

53-
<InlineFilter filters={["react", "angular", "javascript", "vue", "nextjs", "react-native"]}>
5452
Alternatively, you can also pass in an object by specifying the bucket name and region from the console.
5553

5654
```javascript
@@ -121,7 +119,7 @@ RxAmplify.Storage.remove(StoragePath.fromString("public/myUploadedFileName.txt")
121119
</Block>
122120
</BlockSwitcher>
123121

124-
### Remove files from a specified bucket
122+
## Remove files from a specified bucket
125123

126124
You can also perform a remove operation to a specific bucket by providing the `bucket` option. You can pass in a string representing the target bucket's assigned name in Amplify Backend.
127125

@@ -304,7 +302,7 @@ receiveValue: { removedObject in
304302

305303
</BlockSwitcher>
306304

307-
### Remove files from a specified bucket
305+
## Remove files from a specified bucket
308306

309307
You can perform a remove operation from a specific bucket by providing the `bucket` option.
310308

@@ -314,7 +312,7 @@ You can use `.fromOutputs(name:)` to provide a string representing the target bu
314312

315313
```swift
316314
let removedObject = try await Amplify.Storage.remove(
317-
path: .fromString("public/example/path/myFile.txt"),
315+
path: .fromString("public/example/path"),
318316
options: .init(
319317
bucket: .fromOutputs(name: "secondBucket")
320318
)
@@ -327,7 +325,7 @@ You can also use `.fromBucketInfo(_:)` to provide a bucket name and region direc
327325

328326
```swift
329327
let removedObject = try await Amplify.Storage.remove(
330-
path: .fromString("public/example/path/myFile.txt"),
328+
path: .fromString("public/example/path"),
331329
options: .init(
332330
bucket: .fromBucketInfo(.init(
333331
bucketName: "another-bucket-name",

src/pages/[platform]/build-a-backend/storage/upload-files/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ To upload a file from a data object, specify the `path` and the `data` object to
370370
let dataString = "My Data"
371371
let data = Data(dataString.utf8)
372372
let uploadTask = Amplify.Storage.uploadData(
373-
path: .fromString("public/example/path"),
373+
path: .fromString("public/example/path/myFile.txt"),
374374
data: data
375375
)
376376
```
@@ -954,7 +954,7 @@ You can perform an upload operation to a specific bucket by providing the `bucke
954954
You can use `.fromOutputs(name:)` to provide a string representing the target bucket's assigned name in the Amplify Backend.
955955

956956
```swift
957-
// Upload from file
957+
// Upload from File
958958
let uploadTask = Amplify.Storage.uploadFile(
959959
path: .fromString("public/example/path/myFile.txt"),
960960
local: fileUrl,
@@ -963,7 +963,7 @@ let uploadTask = Amplify.Storage.uploadFile(
963963
)
964964
)
965965

966-
// Upload from data
966+
// Upload from Data
967967
let uploadTask = Amplify.Storage.uploadData(
968968
path: .fromString("public/example/path/myFile.txt"),
969969
data: data,

0 commit comments

Comments
 (0)