refactor/better-suspend-model #3

Merged
HideyoshiNakazone merged 9 commits from refactor/better-suspend-model into main 2026-04-17 04:50:56 +00:00
3 changed files with 3 additions and 4 deletions
Showing only changes of commit 56a5d77c6c - Show all commits

View File

@@ -74,7 +74,6 @@ export class S3StorageAdapter implements StorageProvider {
Bucket: this.bucketName, Bucket: this.bucketName,
Key: key, Key: key,
ContentType: contentType, ContentType: contentType,
ACL: ObjectCannedACL.public_read,
}); });
return await getSignedUrl(this.s3Client, command, { expiresIn: 3600 }); return await getSignedUrl(this.s3Client, command, { expiresIn: 3600 });

View File

@@ -7,7 +7,7 @@ import { TypedResult } from '@/utils/types/results';
const storage: StorageProvider = createStorageProvider(); const storage: StorageProvider = createStorageProvider();
export const getSignedUrl = async ( export const getPublicUrl = async (
key: string, key: string,
storageProvider?: StorageProvider storageProvider?: StorageProvider
): Promise<TypedResult<string>> => { ): Promise<TypedResult<string>> => {

View File

@@ -26,7 +26,7 @@ export const uploadFile = wrap(async (file: File) => {
const existsResult = await storage.checkExists(fileKey); const existsResult = await storage.checkExists(fileKey);
if (existsResult) { if (existsResult) {
const presignedUrl = await storage.getSignedUrl(fileKey); const presignedUrl = await storage.getPublicUrl(fileKey);
if (!presignedUrl.ok) { if (!presignedUrl.ok) {
throw new Error('Failed to retrieve file URL'); 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'); throw new Error('Failed to upload file');
} }
const presignedUrl = await storage.getSignedUrl(fileKey); const presignedUrl = await storage.getPublicUrl(fileKey);
if (!presignedUrl.ok) { if (!presignedUrl.ok) {
throw new Error('Failed to retrieve file URL'); throw new Error('Failed to retrieve file URL');
} }