Node.js based forum software built for the modern web
feat: #9232, add profile picture into exported zip
Barış Soner Uşaklıf6cd2862bd7e
diff --git a/src/user/jobs/export-uploads.js b/src/user/jobs/export-uploads.jsindex af2bc64e97..797ba35efb 100644--- a/src/user/jobs/export-uploads.js+++ b/src/user/jobs/export-uploads.js@@ -71,6 +71,15 @@ process.on('message', async function (msg) {archive.pipe(output);winston.verbose('[user/export/uploads] Collating uploads for uid ' + targetUid);await user.collateUploads(targetUid, archive);++ const uploadedPicture = await user.getUserField(targetUid, 'uploadedpicture');+ if (uploadedPicture) {+ const filePath = uploadedPicture.replace(nconf.get('upload_url'), '');+ archive.file(path.join(nconf.get('upload_path'), filePath), {+ name: path.basename(filePath),+ });+ }+archive.finalize();}});