fix: S3 secondary storage client and UI fixes (#7587)

* fix storage selector broken

* Fix writeS3File not returning secondary storage
This commit is contained in:
Diego Imbert
2026-01-16 10:33:22 +00:00
committed by GitHub
parent d8d6c39131
commit b6ef536098
4 changed files with 8 additions and 4 deletions
@@ -122,7 +122,7 @@
(v) => {
if (v === storage) return
storage = v
s3FilePickerInner?.reloadContent()
s3FilePickerInner?.reloadContent?.()
}
}
/>
@@ -443,7 +443,7 @@
: undefined
}
async function reloadContent() {
export async function reloadContent() {
if (initialFileKey !== undefined) {
initialFileKeyInternalCopy = { ...initialFileKey }
}
+1 -1
View File
@@ -975,7 +975,7 @@ class Windmill:
).json()
except Exception as e:
raise Exception("Could not write file to S3") from e
return S3Object(s3=response["file_key"])
return S3Object(s3=response["file_key"], storage=s3object["storage"])
def sign_s3_objects(self, s3_objects: list[S3Object | str]) -> list[S3Object]:
"""Sign S3 objects for use by anonymous users in public apps.
+5 -1
View File
@@ -961,6 +961,7 @@ export async function writeS3File(
});
return {
s3: response.file_key,
...(s3Obj?.storage && { storage: s3Obj?.storage }),
};
}
@@ -1047,7 +1048,10 @@ export async function getPresignedS3PublicUrl(
* This allows pre-approvals that can be consumed by any later suspend step in the same flow.
* @returns approval page UI URL, resume and cancel API URLs for resuming the flow
*/
export async function getResumeUrls(approver?: string, flowLevel?: boolean): Promise<{
export async function getResumeUrls(
approver?: string,
flowLevel?: boolean
): Promise<{
approvalPage: string;
resume: string;
cancel: string;