1

This is the code for uploading Single file in as Play Documentation. Any Idea for Multiple Files?

ws.url(url) .post(Source(FilePart("hello", "hello.txt", Option("text/plain"), FileIO.fromPath(tmpFile.toPath)) :: DataPart("key", "value") :: List()))

  • It depends - does your URL accept an array of data POSTed? If not, you will have to loop through each file you want to upload and do it one by one. – James Whiteley Dec 10 '18 at 13:39
  • @JamesWhiteley - yes, it accepts multiple files, I need to upload multiple files at once, any other solution without using iteration or different rest client that I can use? – user3650102 Dec 10 '18 at 15:12

0 Answers0