Questions tagged [multipartfile]

127 questions
0
votes
0 answers

How to send a multipartFile to an api using react and spring

Hi I am trying to connect a react-app with an api that i did with react. The problem is that I can not send a multipartFile to the api side. If I do the request with postman, work correctly. But if i do the request in my react-app do not…
ddi02
  • 1
  • 1
0
votes
0 answers

Multipart file not uploading

I upload file from JSP but unable to get it in controller @ModelAttribute . File Controller.java @RequestMapping(method = RequestMethod.POST) public String createTestConfig(Model model, @Valid @ModelAttribute("myConfig") myConfigDTO myConfig,…
surm
  • 167
  • 2
  • 11
0
votes
0 answers

How to post image file in body of post method?

backend is taking image as fileHere is my http post method where I had send data like title,link,description as string but when I tried to post image file it didn't work void create(String title, link,description,File image) async { try { Response…
0
votes
0 answers

How to UnTar a .tar.gz MultipartFile send in a request and add the files to a List

I want to extract all the files in my .tar.gz MultipartFile and add the files to a List @RequestMapping(value="/importFile", produces="application/json", method=RequestMethod.POST) @ResponseBody public ca.alea.cam.api.model.Response…
user1971376
  • 93
  • 1
  • 4
  • 10
0
votes
1 answer

File size validation with spring MultipartFile

I need to do a validation on file size in spring MultipartFile in a spring boot application. For example I want to restrict files upload more than 10MB. So i used below in application.yml, servlet: multipart: max-file-size: 10MB …
Harshana
  • 7,297
  • 25
  • 99
  • 173
0
votes
1 answer

MultipartReader issue, content already been read by another component

Implementing "Upload large files with streaming" (https://learn.microsoft.com/en-us/aspnet/core/mvc/models/file-uploads?view=aspnetcore-6.0) gives me this error: Unexpected end of Stream, the content may have already been read by another…
Olof84
  • 919
  • 4
  • 14
  • 29
0
votes
1 answer

Best way to parse multipart file (CSV) and write in DB

I have a file that is received as a multipart file from an HTTP request. I need to read this file, validate data and write it to a database. The file looks like aaaa@aaa.ru;Bogdan The file contains 500k rows. I am not able to save the file into…
JD_UA
  • 43
  • 5
0
votes
1 answer

Trying to upload a file with Ferry GraphQL and Flutter throws a "Converting object to an encodable object failed: Instance of 'MultipartFile'". Error

I've been following this guide https://medium.com/@p02diada/how-to-upload-files-with-ferry-graphql-and-flutter-34a2801d6a8a on how to upload a file using Ferry GraphQL. The only difference is that I'm using Dio's MultipartFile instead of http's…
Patttt
  • 51
  • 1
  • 3
0
votes
0 answers

Spring MVC - File Upload is working while debug, not working while deploy as WAR in Linux

In a Spring MVC-based project, Spring's CommonsMultipartFile is used to handle the file upload/transfer process. The overall file uploading process is working fine in Linux if I run the project from STS, but when I export the WAR file from the…
Shimul
  • 463
  • 2
  • 7
  • 33
0
votes
0 answers

400 Bad Request Error in the Unit Test with Multipart File and WebTestClient Object

I am trying to create a unit test with webTestClient POST for my controller. In the API, I have a multipartfile and two String parameter. However, I couldn't catch the request in the API although I have tried a lot of thing. Where am I wrong? My API…
0
votes
1 answer

Flutter Http Multi part Request get response body

I want to get response data from MultipartRequest I uploaded an image to service and I should get image URL in response but I got an Bad state: Stream has already been listened to. this My code snippet //upload image Future
FadyFouad
  • 815
  • 6
  • 12
0
votes
0 answers

Why does java Spring return no such method exception for aws sdk while initializing the awsS3Client

I'm trying to upload dynamic objects into the s3 bucket in my web application. But struggling with no such method error during initializing the AWS3Client. Initially, the input is a multipart image saving it into a local machine and then using it…
0
votes
2 answers

ZipInputStream is closes when reading first ZipEntry of Excel files

I'm uploading zip of excel files as multipart file, but when I create Workbook object of first file, the stream gets closed and I'm not able to read next files. its working with single file in zip but not with multiple files. can anybody help? TIA. …
0
votes
0 answers

Flutter Dio multipart image, Cannot read property '0' of undefined

I am trying to send multiple images to the backend server. I have tried Dio and Http but the server responds with an error and the rest of the data except the images get saved. The documentation says that the key values must be 'images_0' 'images_1'…
user16805472
0
votes
1 answer

Flutter - how to get Stream Response of Video mp4 and download it

i am using Multipart Request in which i post image after that i get response of video.mp4 but i dont know how to get this response i tried response.stream.bytetoString() //which give me formatexception which is unexpected byte i dont know…
Adnan haider
  • 553
  • 8
  • 21
1 2 3
8 9