Class SupabaseStorage
java.lang.Object
com.codename1.cloud.supabase.SupabaseStorage
Supabase Storage: upload, download and remove objects in buckets, and
build public URLs for public buckets.
-
Method Summary
Modifier and TypeMethodDescriptionAsyncResource<byte[]> Downloads an object with the current user's credentials.getPublicUrl(String bucket, String path) The URL of an object in a public bucket.Removes objects from a bucket.Uploads an object.
-
Method Details
-
upload
public AsyncResource<Map<String,Object>> upload(String bucket, String path, byte[] data, String contentType, boolean upsert) Uploads an object.
Parameters
-
bucket: the bucket -
path: the object path inside the bucket,folder/file.png -
data: the content -
contentType: the MIME type -
upsert: true to replace an existing object
Returns
the response, holding the object
Key -
-
download
Downloads an object with the current user's credentials.
Parameters
-
bucket: the bucket -
path: the object path
Returns
the bytes
-
-
remove
Removes objects from a bucket.
Parameters
-
bucket: the bucket -
paths: the object paths
Returns
completes with true when the request succeeds
-
-
getPublicUrl
-