Skip to content

Commit cff178b

Browse files
author
Hein
committed
Formatting and fixes
1 parent 3d4f7c3 commit cff178b

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tutorials/code-changes/aws-s3-storage-adapter.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: "Use AWS S3 for attachment storage"
3-
description: "In this tutorial, we will show you how to use AWS S3 for attachment storage by modifying the [React Native To-Do List example app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist)."
3+
description: "In this tutorial, we will show you how to replace Supabase Storage with AWS S3 for handling attachments in the [React Native To-Do List example app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist)."
44
sidebarTitle: "AWS S3 attachment storage"
55
---
66

77
<Warning>
88
The following pre-requisites are required to complete this tutorial:
9-
- Clone the [To-Do List example app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist)
9+
- Clone the [To-Do List example app](https://github.com/powersync-ja/powersync-js/tree/main/demos/react-native-supabase-todolist) repo
1010
- Follow the instructions in the [README](https://github.com/powersync-ja/powersync-js/blob/main/demos/react-native-supabase-todolist/README.md) and ensure that the app runs locally
1111
- A running PowerSync Service (can be self-hosted)
1212
</Warning>
@@ -275,7 +275,7 @@ sidebarTitle: "AWS S3 attachment storage"
275275
<Accordion title="Explanation">
276276
The `AWSStorageAdapter` class implements a storage adapter for AWS S3, allowing file operations (upload, download, delete) with an S3 bucket.
277277

278-
<Accordion title="uploadFile">
278+
<Accordion title="uploadFile" defaultOpen={true}>
279279
```typescript
280280
async uploadFile(filename: string, data: ArrayBuffer, options?: { mediaType?: string; }): Promise<void>
281281
```
@@ -285,7 +285,7 @@ sidebarTitle: "AWS S3 attachment storage"
285285
- Includes error handling and logging
286286
</Accordion>
287287

288-
<Accordion title="downloadFile">
288+
<Accordion title="downloadFile" defaultOpen={true}>
289289
```typescript
290290
async downloadFile(filePath: string): Promise<Blob>
291291
```
@@ -295,7 +295,7 @@ sidebarTitle: "AWS S3 attachment storage"
295295
- Includes error handling for missing files/data
296296
</Accordion>
297297

298-
<Accordion title="deleteFile">
298+
<Accordion title="deleteFile" defaultOpen={true}>
299299
```typescript
300300
async deleteFile(uri: string, options?: { filename?: string }): Promise<void>
301301
```
@@ -405,7 +405,6 @@ sidebarTitle: "AWS S3 attachment storage"
405405
</AccordionGroup>
406406

407407
## The complete files used in this tutorial can be found below:
408-
<Accordion title="Files">
409408
<CodeGroup>
410409
```bash .env
411410
# Replace the credentials below with your Supabase, PowerSync and Expo project details.
@@ -693,6 +692,3 @@ sidebarTitle: "AWS S3 attachment storage"
693692
export const useSystem = () => React.useContext(SystemContext);
694693
```
695694
</CodeGroup>
696-
</Accordion>
697-
698-

0 commit comments

Comments
 (0)