0

I want to create an Online Shopping app with Spring and Spring Data Jpa.

The problem which I am facing is that when I want to attach multiple images (as multipart file) in the POJO itself but I'm not able to figure out.

Ishank Gulati
  • 633
  • 1
  • 8
  • 22
  • 1
    please share more details with the code you can receive your POJO as `@RequestBody` and can get an image as a `@RequestParam` if you don't want to image in POJO – Romil Patel Jul 17 '19 at 08:13
  • depending on your models and setup it might be easier to just send the data and store that then wait for a response and then send the images with the params in the path. – Matt Jul 17 '19 at 08:16
  • Standard practice is to store images on a server or maybe AWS S3 and then give image links in POJO. – Ishank Gulati Jul 17 '19 at 08:17
  • try from this [Howto upload multiple files with Spring Boot...](https://stackoverflow.com/questions/38971705/howto-upload-multiple-files-with-spring-boot-and-test-it-with-curl) . you will have a basic idea. – user404 Jul 17 '19 at 09:14

0 Answers0