finalized archiveHandler/background worker logic
This commit is contained in:
@@ -4,7 +4,8 @@ export default async function validateUrlSize(url: string) {
|
||||
|
||||
const totalSizeMB =
|
||||
Number(response.headers.get("content-length")) / Math.pow(1024, 2);
|
||||
if (totalSizeMB > 50) return null;
|
||||
if (totalSizeMB > (Number(process.env.NEXT_PUBLIC_MAX_FILE_SIZE) || 30))
|
||||
return null;
|
||||
else return response.headers;
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
|
||||
Reference in New Issue
Block a user