This commit is contained in:
2026-05-31 22:02:38 +02:00
parent 09fcf8d8ec
commit d594ac2edd
2 changed files with 72 additions and 21 deletions

View File

@@ -8,6 +8,7 @@ import path from "path";
import https from "https";
import { getManualApproval, getMinTags, getTrustedUploads, getBypassDuplicateCheck, getEnablePdf } from "./inc/settings.mjs";
import { parseMultipart, collectBody } from "./inc/multipart.mjs";
import f0cklib from "./inc/routeinc/f0cklib.mjs";
// Helper for JSON response
const sendJson = (res, data, code = 200) => {
@@ -560,6 +561,8 @@ export const handleUpload = async (req, res, self) => {
// Action if auto-approved
if (!manualApproval) {
// Bust the count cache so page totals update immediately
f0cklib.clearCountCache();
if (!linkedToExisting) {
// Move logic: Handles both real files and symlinks (reposts) correctly
const moveSafe = async (src, dst) => {