preventing to upload file with same name

This commit is contained in:
sanjayk03-dev
2024-03-29 03:05:37 +05:30
parent 074533b17b
commit 72fc59ee04
3 changed files with 17 additions and 3 deletions

View File

@@ -72,9 +72,6 @@ module.exports = {
}
const response = await fetch(`/api/file/${file}`, { cache: "no-cache" });
if (response.status == 400) {
return;
}
const text = await response.text();
if (text.length > 20e6) {