Bucket
File can be grouped into Bucket.
Bucket are created dynamically when you upload a new file.
From API
In the example below, the bucket `my-super-bucket` will be created.
const resultPreSignUrl = await getPreSignedUrlApplicationFile(
{ applicationId: "my-application-id" },
{
type: PreSignUrlType.UPLOAD,
fileName: fileToUpload.name,
bucket: `my-super-bucket`
},
);
You can manage buckets using deleteBucketApplicationFile, renameBucketApplicationFile, and updateBucketApplicationFile
// It will delete bucket `my-bucket` and sub buckets `my-bucket/sub-bucket` and corresponding files
await deleteBucketApplicationFile(
{ applicationId: "my-application-id" },
{ bucket: `my-bucket` },
);
// It will rename bucket
// `my-bucket` -> `new-bucket`
// `my-bucket/sub-bucket` -> `new-bucket/sub-bucket/`
await renameBucketApplicationFile(
{ applicationId: "my-application-id" },
{ bucket: `my-bucket`, newBucket: `new-bucket` },
);
// It will update bucket for corresponding file
// Before: file.bucket => `old-bucket/sub-bucket`
// After: file.bucket => `my-bucket/`
await updateBucketApplicationFile(
{ applicationId: "my-application-id" },
{ bucket: `my-bucket`, applicationFileIds: ["file-id"] },
);
Client App
Create new bucket
You can create a new bucket by moving to a specific bucket path and upload a new file.

Rename bucket
You can update bucket for multiple files

Last updated