mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 03:11:12 -05:00
Fix Cloudflare image upload
This commit is contained in:
@@ -81,7 +81,8 @@ export function PhotoUpload({
|
||||
size: file.size,
|
||||
type: file.type,
|
||||
uploadedAt: new Date().toISOString()
|
||||
}
|
||||
},
|
||||
variant: isAvatar ? 'avatar' : 'public'
|
||||
}
|
||||
});
|
||||
|
||||
@@ -120,11 +121,14 @@ export function PhotoUpload({
|
||||
});
|
||||
|
||||
if (!statusError && statusData?.success && statusData.uploaded && statusData.urls) {
|
||||
const imageUrl = isAvatar ? statusData.urls.avatar : statusData.urls.original;
|
||||
const thumbUrl = isAvatar ? statusData.urls.avatar : statusData.urls.thumbnail;
|
||||
|
||||
return {
|
||||
id: statusData.id,
|
||||
url: statusData.urls.original,
|
||||
url: imageUrl,
|
||||
filename: file.name,
|
||||
thumbnailUrl: statusData.urls.thumbnail
|
||||
thumbnailUrl: thumbUrl
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user