When you say update, you mean you want to change the image or perform actions and then update?
change the image
this is function that change user's logo image
amm, you cannot actually make changes, you can upload a new image, and use new ID. This approach helps with 0 downtime during image update.
I'll try it and post it later
I tried it but...
New picture is successfully downloaded to the Storage
but when i getFilePreview this shows me past picture
maybe I'll wait a few minutes or this is error here?
did you try again now?
did you re-use the same ID?
Yes
i highly advise against this due to caching.
I have one idea, i'll try it and report later
i'm trying to save new file id in user's prefs but
This code ALWAYS returns unique() string
String newAvatarFileId = (String) ID.Companion.unique();
Why this code isn't generate random id string?
P.S but
in this code works correct only createFile() function
because that's what the function does: https://github.com/appwrite/sdk-for-android/blob/10cc15d7546e9dae5eb131c77270b5d89c82d894/library/src/main/java/io/appwrite/ID.kt#L8
The server detects "unique()" and generates a unique ID server-side
how to catch this value and save in the prefs?
Get the file id from the response of create file
Thanks, it FINALLY works!
[SOLVED] Update Image File to Storage
Recommended threads
- Clarification about `Content` in terms a...
Hello, I'm looking into using Appwrite's cloud storage and got a bit concerned about this part in the terms page: https://appwrite.io/terms#content > Our Serv...
- ClamAV antivirus scanning only works wit...
https://github.com/appwrite/appwrite/issues/10921 pleas assign this issue to me
- Subscription Problem
I'm making an app in RN with Expo and Appwrite and there's a functionality which allows the user to create a task/test (i'll be reffering to them collectively a...