You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: infra/postgres/dummy-data.sql
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -51,4 +51,6 @@ CREATE POLICY authenticated_folder ON storage.objects for all USING (bucket_id='
51
51
-- allow CRUD access to a folder in bucket2 to its owners
52
52
CREATE POLICY crud_owner_only ONstorage.objects for all USING (bucket_id='bucket2'and (storage.foldername(name))[1] ='only_owner'and owner =auth.uid());
53
53
-- allow CRUD access to bucket4
54
-
CREATE POLICY open_all_update ONstorage.objects for all WITH CHECK (bucket_id='bucket4');
54
+
CREATE POLICY open_all_update ONstorage.objects for all WITH CHECK (bucket_id='bucket4');
55
+
56
+
CREATE POLICY crud_my_bucket ONstorage.objects for all USING (bucket_id='my-private-bucket'andauth.uid()::text='317eadce-631a-4429-a0bb-f19a7a517b4a');
* The resize mode can be cover, contain or fill. Defaults to cover.
87
+
* Cover resizes the image to maintain it's aspect ratio while filling the entire width and height.
88
+
* Contain resizes the image to maintain it's aspect ratio while fitting the entire image within the width and height.
89
+
* Fill resizes the image to fill the entire width and height. If the object's aspect ratio does not match the width and height, the image will be stretched to fit.
@@ -259,11 +265,12 @@ export default class StorageFileApi {
259
265
* @param path The file path, including the current file name. For example `folder/image.png`.
260
266
* @param expiresIn The number of seconds until the signed URL expires. For example, `60` for a URL which is valid for one minute.
261
267
* @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
268
+
* @param options.transform Transform the asset before serving it to the client.
@@ -386,19 +401,39 @@ export default class StorageFileApi {
386
401
* This function does not verify if the bucket is public. If a public URL is created for a bucket which is not public, you will not be able to download the asset.
387
402
*
388
403
* @param path The path and name of the file to generate the public URL for. For example `folder/image.png`.
389
-
* @param options.download triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
404
+
* @param options.download Triggers the file as a download if set to true. Set this parameter as the name of the file if you want to trigger the download with a different filename.
405
+
* @param options.transform Transform the asset before serving it to the client.
0 commit comments