feat: implement file existence check and improve file upload handling
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user