DO Spaces enabled: namespace IAP video uploads under iap-uploads/ in the shared media bucket
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -861,7 +861,7 @@ const server = http.createServer(async (req, res) => {
|
|||||||
// images stay local. Falls back to the volume if Spaces isn't set or errors.
|
// images stay local. Falls back to the volume if Spaces isn't set or errors.
|
||||||
if (isVideo && spaces.enabled()) {
|
if (isVideo && spaces.enabled()) {
|
||||||
try {
|
try {
|
||||||
const url = await spaces.put('uploads/' + name, buf, ct);
|
const url = await spaces.put('iap-uploads/' + name, buf, ct);
|
||||||
return json(res, 200, { url, type: 'video' });
|
return json(res, 200, { url, type: 'video' });
|
||||||
} catch (e) { console.error('spaces put', e.message); /* fall through to volume */ }
|
} catch (e) { console.error('spaces put', e.message); /* fall through to volume */ }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user