refactor: rename getSignedUrl to getPublicUrl for clarity in storage functions
This commit is contained in:
@@ -26,7 +26,7 @@ export const uploadFile = wrap(async (file: File) => {
|
||||
|
||||
const existsResult = await storage.checkExists(fileKey);
|
||||
if (existsResult) {
|
||||
const presignedUrl = await storage.getSignedUrl(fileKey);
|
||||
const presignedUrl = await storage.getPublicUrl(fileKey);
|
||||
if (!presignedUrl.ok) {
|
||||
throw new Error('Failed to retrieve file URL');
|
||||
}
|
||||
@@ -48,7 +48,7 @@ export const uploadFile = wrap(async (file: File) => {
|
||||
throw new Error('Failed to upload file');
|
||||
}
|
||||
|
||||
const presignedUrl = await storage.getSignedUrl(fileKey);
|
||||
const presignedUrl = await storage.getPublicUrl(fileKey);
|
||||
if (!presignedUrl.ok) {
|
||||
throw new Error('Failed to retrieve file URL');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user