From d6051e89f83eeec370ac8fdbb9dba470157f8548 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 9 Dec 2025 07:39:34 +0000 Subject: [PATCH] docs(python): fix create_signed_upload_url upsert option (#40221) --- apps/docs/spec/supabase_py_v2.yml | 32 ++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/apps/docs/spec/supabase_py_v2.yml b/apps/docs/spec/supabase_py_v2.yml index c64487b7b8e..c95074c8875 100644 --- a/apps/docs/spec/supabase_py_v2.yml +++ b/apps/docs/spec/supabase_py_v2.yml @@ -7762,6 +7762,14 @@ functions: type: string description: | The file path, including the current file name. For example `"folder/image.png"`. + - name: options + isOptional: true + type: CreateSignedUploadUrlOptions + subContent: + - name: upsert + isOptional: true + type: string + description: When upsert is set to true, the file is overwritten if it exists. When set to false, an error is thrown if the object already exists. Defaults to false. examples: - id: create-signed-url name: Create Signed URL @@ -7781,6 +7789,24 @@ functions: "token": "" } ``` + - id: create-signed-url-upsert + name: Create Signed URL with upsert + code: | + ```python + response = ( + supabase.storage + .from_("avatars") + .create_signed_upload_url("folder/avatar1.png", {"upsert": "true"}) + ) + ``` + response: | + ```json + { + "signedUrl": "https://example.supabase.co/storage/v1/object/upload/sign/avatars/folder/cat.jpg?token=", + "path": "folder/cat.jpg", + "token": "" + } + ``` - id: from-upload-to-signed-url title: 'from_.upload_to_signed_url()' description: Upload a file with a token generated from `create_signed_upload_url`. @@ -7805,7 +7831,7 @@ functions: description: The body of the file to be stored in the bucket. - name: options isOptional: false - type: FileOptions + type: UploadSignedUrlFileOptions subContent: - name: cache-control isOptional: true @@ -7817,10 +7843,6 @@ functions: type: string description: | The `Content-Type` header value. Should be specified if using a `file` that is neither `Blob` nor `File` nor `FormData`, otherwise will default to `text/plain;charset=UTF-8`. - - name: upsert - isOptional: true - type: string - description: When upsert is set to true, the file is overwritten if it exists. When set to false, an error is thrown if the object already exists. Defaults to false. examples: - id: create-signed-url name: Create Signed URL