@samitouri / QOSami-HFS / commits / 0dcc0e09

upload: avoid useless parameters

Massimo Melina committed Dec 23, 2023 at 19:56 UTC 0dcc0e09904e72839c1d38366aeb4c9da1917989
1 file changed +2 -2
frontend/src/upload.ts
+2 -2
@@ -301,8 +301,8 @@ async function startUpload(toUpload: ToUpload, to: string, resume=0) {
301 }
302 req.open('POST', to + '?' + new URLSearchParams({
303 notificationChannel,
304 - resume: String(resume),
305 - comment: toUpload.comment || '',
304 + ...resume && { resume: String(resume) },
305 + ...toUpload.comment && { comment: toUpload.comment },
306 ...uploadState.skipExisting && { skipExisting: '1' },
307 }), true)
308 const form = new FormData()