mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-10 00:05:27 +00:00
fix: S3 secondary storage client and UI fixes (#7587)
* fix storage selector broken * Fix writeS3File not returning secondary storage
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user