Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add React Native samples to Storage Quick Start #1064

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

choir241
Copy link
Contributor

@choir241 choir241 commented Jun 20, 2024

What does this PR do?

Add React Native samples in Storage Quick Start.

Fixes #1053

Test Plan

Manually created React native application to test the code snippet
Maually created the HTTP code snippet to ensure its accuracy

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

Yes

Copy link

render bot commented Jun 20, 2024

@choir241 choir241 requested a review from stnguyen90 June 20, 2024 17:40
@choir241 choir241 linked an issue Jun 21, 2024 that may be closed by this pull request
3 tasks
@choir241 choir241 requested a review from stnguyen90 June 24, 2024 13:45
@coolify-appwrite-org
Copy link

coolify-appwrite-org bot commented Jun 25, 2024

The preview deployment is ready. 🟢

Open Preview | Open Build Logs

Last updated at: 2024-08-13 16:35:52 CET

@choir241 choir241 requested a review from stnguyen90 June 25, 2024 20:24
@choir241 choir241 requested a review from stnguyen90 June 26, 2024 13:21
const storage = new Storage(client);

const promise = await storage.createFile(
'[BUCKET_ID]',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@choir27 We use <> angle brackets universally for placeholders now. I started moving toward this but didn't finish. Make sure you stay consistent!

{
name: 'file.jpeg',
type: 'image/jpeg',
uri: 'file:///data/user/0/host.exp.exponent/cache/ExperienceData/text.jpeg',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make sure the URI is something generic and reasonable :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also ask @lohanidamodar to see if there's inputfiles for react native.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed with @lohanidamodar that there are currently no inputfiles for react native

uri: 'file:///data/user/0/host.exp.exponent/cache/ExperienceData/text.jpeg',
size: 183799
}, // FILE
Permission.read('any')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure this uses the same params as all the other examples on this page. I think some other examples don't show permission, but if you want to add it here, make sure ALL examples are updated to be consistent!

choir241 added 2 commits June 27, 2024 10:23
…ers. Update file object for all storage code snippets for consistency
@choir241 choir241 requested review from gewenyu99 and stnguyen90 June 27, 2024 14:30
choir241 added 3 commits June 28, 2024 11:25
…operties until testing code snippets successfully create file. Update REST code snippets tentatively, still need to successfully create file with new code
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
@choir241 choir241 requested a review from stnguyen90 July 2, 2024 15:59
@choir241 choir241 requested a review from stnguyen90 July 15, 2024 15:06
src/routes/docs/products/storage/quick-start/+page.markdoc Outdated Show resolved Hide resolved
Comment on lines 114 to 120
Content-Disposition: form-data; name='fileId'
<FILE_ID>
-----1234
Content-Disposition: form-data; name='file'; filename='image.jpg'
Content-Type: image/jpg
<FILE_CONTENT>
-----1234
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new lines are incorrect. Please look at samples of how this should be formatted and make sure it matches.

choir241 and others added 3 commits July 25, 2024 14:29
…s. add projectid comment to match consistency with other code snippets. Add spacing to http to match other http code snippets. Add http code snippet to downloadFile.
@choir241 choir241 requested a review from stnguyen90 August 13, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📚 Documentation: Add React Native samples to Storage Quick Start
3 participants