Source code for series: github.com/MexJason/SupabaseSwift/tree/main Dont forget to like comment share and subscribe 😃
@Kevoniori
Жыл бұрын
I get this error: StorageError(statusCode: Optional(400), message: Optional("Invalid JWT")) and sometimes this error: Error Domain=NSPOSIXErrorDomain Code=40 "Message too long"
@rtorcato
Жыл бұрын
service_role secret should never be shared in front end code. That code can do anything on the database. There has to be another way to do upload in swift without using that secret. I believe the bucket policy needs to be changed to allow any uploads by a user.
@jasondubon
Жыл бұрын
That is true, this was the only quick that would allow access to the storage module. They just merged a new PR that may have fixed the issue. I will test it now. Were you able to upload/download without the servicce_role secret?
@rtorcato
Жыл бұрын
@@jasondubon I'm trying it will let you know if I find a work around
@rtorcato
Жыл бұрын
@@jasondubon ok it's working without service key. Even tho the storage bucket is set to "public" you won't be able to upload without first setting the storage policy for inserting. I added ((bucket_id = 'images'::text) AND (auth.uid() = id)) to my policy. Removed the storage client from your code and I only use one supabase client. I also delete the file on supabase before I add the new one. This is better than uploading on update fail.
@keetsta
Жыл бұрын
Waiting for repo && TYSM for async pfp loading, ut helps so much!
@jasondubon
Жыл бұрын
Uploading it soon, working on a few things atm
@AlbertPCo
Жыл бұрын
yo you're exposing your keys in your github (storagemanager)
@jasondubon
Жыл бұрын
Thanks, I will remove that asap!
@keetsta
Жыл бұрын
StorageError(statusCode: Optional(404), message: Optional("no Route matched with those values")) did you know what it means?
@jasondubon
Жыл бұрын
did you add /storage/v1 to the end of URL in the StorageManager ?
@keetsta
Жыл бұрын
@@jasondubon thank you so much, your tutorials and answers helped me a lot with the project
@jasondubon
Жыл бұрын
@@keetsta glad it helped!
@keetsta
Жыл бұрын
Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.jpeg" :( in some transitions, you do not talk about the code that you wrote, and sometimes it is not visible. maybe I missed something, it is very important for me, the repository would be very useful in this situation
@jasondubon
Жыл бұрын
Did you try to upload the image with the purple/voilet flowers? Because that one causes the simultor to crash
@jasondubon
Жыл бұрын
Just shared the repo. Let me know what part of the video/code are you stuck on
Пікірлер: 19