Merge pull request #430 from linkwarden/hotfix/file-size-error

bypass error
This commit is contained in:
Daniel
2024-01-17 19:08:25 +03:30
committed by GitHub
2 changed files with 2 additions and 7 deletions
+2 -1
View File
@@ -43,7 +43,8 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {
? await validateUrlSize(link.url)
: undefined;
if (validatedUrl === null) throw "File is too large to be stored.";
if (validatedUrl === null)
throw "Something went wrong while retrieving the file size.";
const contentType = validatedUrl?.get("content-type");
let linkType = "url";
-6
View File
@@ -67,12 +67,6 @@ export default async function postLink(
const validatedUrl = link.url ? await validateUrlSize(link.url) : undefined;
if (validatedUrl === null)
return {
response: "Something went wrong while retrieving the file size.",
status: 400,
};
const contentType = validatedUrl?.get("content-type");
let linkType = "url";
let imageExtension = "png";