mongodb - Uploading multiuple images with Node.js using Multer S3/Amazon S3 -
overview: have figured out how allow users upload multiple images amazon s3 using node, express & multers3. code shows solution below. working well. issue on edit route. want users able edit or delete images. far way have been able have new images override previous filepaths. this big problem because means user has reupload every single image every time try edit post. not good. think solution might create images array instead of having individual image paths. appreciate advice. i've seen code creating array local storage i'm not sure how alter work amazon s3: if(req.files.length) { for(var = 0; < req.files.length; i++) { updatedlisting.moreimages.push() // needs push amazon s3 here somehow. } updatedlisting.save(); first show "listings" mongoose model: var listingsschema = new mongoose.schema({ name: string, description: string, image: string, image2: string, image3: string, image4: string, image5: string, author: { ...