Each File on Abyss Storage can have multiple thumbnails.
Thumbnail is a preview of a media file in lower resolution for fast loading time.
// Generate a new Thumbnail
await generateApplicationFileThumbnail(
{
applicationId: "application-id",
applicationFileThumbnailId: "application-file-thumbnail-id",
},
{
x: 256, // Optional
y: 256, // Optional
name: "My-New-Thumbnail", // Optional
customPublicAccessId: "my-custom-public-access" // Option
},
);
// Refresh thumbnails (in case the origin file changed)
await regenerateApplicationFileThumbnail(
{ applicationId: state.currentApplicationId },
{
applicationFileThumbnailId: [
"application-file-thumbnail-id",
],
},
);
// Download the thumbnail (without Authentication)
await downloadApplicationFileThumbnail({
applicationFileThumbnailPublicAccessId: "application-file-thumbnail-public-access-id",
});