feat: implement file existence check and improve file upload handling

This commit is contained in:
2026-04-11 00:14:45 -03:00
parent d99ab44ec2
commit c4a22a7583
7 changed files with 83 additions and 15 deletions

View File

@@ -16,6 +16,16 @@ export const getSignedUrl = async (
return await storageProvider.get(key);
};
export const checkExists = async (
key: string,
storageProvider?: StorageProvider
): Promise<boolean> => {
if (!storageProvider) {
storageProvider = storage;
}
return await storageProvider.exists(key);
};
export const getPutUrl = async (
key: string,
contentType: string,