mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	feat: #9232, add profile picture into exported zip
This commit is contained in:
		| @@ -71,6 +71,15 @@ process.on('message', async function (msg) { | |||||||
| 		archive.pipe(output); | 		archive.pipe(output); | ||||||
| 		winston.verbose('[user/export/uploads] Collating uploads for uid ' + targetUid); | 		winston.verbose('[user/export/uploads] Collating uploads for uid ' + targetUid); | ||||||
| 		await user.collateUploads(targetUid, archive); | 		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(); | 		archive.finalize(); | ||||||
| 	} | 	} | ||||||
| }); | }); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user