mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
Add generic S3 multipart helpers
This commit is contained in:
1 parent
c68c953789
commit
e6ecbaf9e6
5 files changed
+322
-237
No files matched your search
+3
-1
@@ -6,7 +6,8 @@ import {
|
||||
attachCustomDomainAndWait,
|
||||
setManagedDomain,
|
||||
} from "./storage/r2-mgmt.js";
|
||||
import { makeR2Client, multipartUpload } from "./storage/r2-s3.js";
|
||||
import { makeR2Client } from "./storage/r2-s3.js";
|
||||
import { multipartUpload } from "./storage/s3-multipart.js";
|
||||
import { userLogger } from "./utils/logger.js";
|
||||
|
||||
const STORAGE_KEY = "bitvid:quickR2Settings";
|
||||
@@ -364,6 +365,7 @@ export function initQuickR2Upload(app) {
|
||||
key,
|
||||
file,
|
||||
contentType: file.type,
|
||||
createBucketIfMissing: true,
|
||||
onProgress: (fraction) => {
|
||||
if (typeof fraction !== "number" || !isFinite(fraction)) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user