im new in s3 and i need some help please/
1.I get some file from rest api its looks like
@PostMapping ("/aaa")
public void aaa(@RequestParam("file")MultipartFile file)
how do i can put it to s3 without saving in local like this
File f=new File(System.getProperty("java.io.tmpdir")+"/"+file.getOriginalFilename());
file.transferTo(f);
s3client.putObject("netapi", file.getOriginalFilename(),f);
i need to put file like it is - for example i put img.png to rest api and i need to get link from s3 to same file that be able to download and open without any converting on client pc
2.second question is there any way to do not use MultipartFile in rest api - may be there is a way to covert inputStream that i can get from HttpServletRequest.getInputStream() to a file with same file name and file extension
i use sdk for java 1.X
implementation(group = "com.amazonaws",name="aws-java-sdk-s3",version = "1.11.1008")