fhr
01/04/2022, 12:45 PMpublic/avatar1.png
in your example? This is the path of the file inside the bucket (avatars
in this case). The bucket is like a folder on your operating system, so the filePath is the path or folder structure inside this folder.Deleted User
01/04/2022, 12:50 PM.upload('public/avatar1.png', avatarFile...)
looks if the avatar1.png file is already there even if I just created a new bucket.
What happens I point my file to this path? You know what I mean I am so comfused.
Or does it just imply that after you'd upload the image that filepath would be created inside Supabase storage but then that doesn't make any sense to push another file where another "file" already is, you'd want to push a file in a folder not a file?
Sorry I am as confused as my message here thanks for taking the time!Deleted User
01/04/2022, 12:52 PMDeleted User
01/04/2022, 12:53 PMfhr
01/04/2022, 1:04 PMpublic/avatar1.png
file. If you try to upload a file with the same path again, there will be an error.
if you want to store the user's avatar for example, consider using the uuid of the user as part of the filePath. for multiple files, consider creating some sort of unique id for the files. you can nest them inside of a folder.
public/user_3d280bcb-9ae6-4b05-960d-7194981fb7e5/5ca68ee8-adfb-4bc9-b300-46d51a9c0da5.pdf
public/user_3d280bcb-9ae6-4b05-960d-7194981fb7e5/2117ed4f-6717-4c8d-b0d6-cd66b9279cbc.pdf
and so onDeleted User
01/04/2022, 3:39 PMandyouareagone
01/04/2022, 3:48 PMDeleted User
01/04/2022, 3:49 PMDeleted User
01/04/2022, 3:49 PMandyouareagone
01/04/2022, 3:49 PMandyouareagone
01/04/2022, 3:50 PMDeleted User
01/04/2022, 3:52 PMDeleted User
01/04/2022, 3:54 PMandyouareagone
01/04/2022, 3:56 PMDeleted User
01/04/2022, 3:56 PM