-
Notifications
You must be signed in to change notification settings - Fork 203
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
base: main
Are you sure you want to change the base?
Conversation
Your Render PR Server URL is https://appwrite-io-docker-pr-1064.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cpq6ijeehbks73e0lsq0. |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2024-08-13 16:35:52 CET |
…i-line code, replace read[any] with Appwrite Permission
const storage = new Storage(client); | ||
|
||
const promise = await storage.createFile( | ||
'[BUCKET_ID]', |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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') |
There was a problem hiding this comment.
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!
…ers. Update file object for all storage code snippets for consistency
…operties until testing code snippets successfully create file. Update REST code snippets tentatively, still need to successfully create file with new code
Co-authored-by: Steven Nguyen <[email protected]>
Co-authored-by: Steven Nguyen <[email protected]>
…or ID and inputFile
…otes for consistency across code snippets
…te/website into docs-react-native-samples
Co-authored-by: Steven Nguyen <[email protected]>
Co-authored-by: Steven Nguyen <[email protected]>
…tain consistency in placeholder variable. remove extra indentation and extra newline in codesnippet
…otlin and apple code samples for runtime accuracy
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 |
There was a problem hiding this comment.
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.
Co-authored-by: Steven Nguyen <[email protected]>
…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.
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