Questions tagged [multipartfile]
127 questions
0
votes
0 answers
How to upload MultipartFile in htmlunit?
I am using HtmlUnit to upload a file by making a request to the spring controller. The file is of type MultipartFile.
Using the below code works only for File Type java.io.File. How do i make the call for MultipartFile?
WebRequest request = new…

James Franco
- 53
- 3
- 10
0
votes
0 answers
Integration of swagger API controller with MultipartFile in tests with JUnit 5
I´m new working with Spring Boot v2.3.0.RELEASE, Java 8, JUnit 5, and Swagger OAS 3, I try to test the integration of the API Controller (generated with swagger-codegen) with my service, this controller contains a unique method that allows upload…

David Navarro Astudillo
- 1,329
- 11
- 20
0
votes
0 answers
MultipartFile Wrapper Object woks as @ModelAttribute but not as @RequestParam
I created a spring RestController to process fileUpload from a react js UI.
To be able to use custom validations by @Validated annotation, had to wrap the MultipartFile into a class, I named it as UploadedFile. Created my Post Handler method with…

ThrowableException
- 1,168
- 1
- 8
- 29
-1
votes
0 answers
I am having a problem while uploading files to a folder on my server & am using flutter packages "file_picker" and "http" to select and send using php
I want to submit form which contains files and textformfield data. First I select the files from phone, in debug console I can see the path of the selected files but it is in cache like this:
"Selected file paths:…

Mohammad Ali
- 13
- 2
-1
votes
1 answer
Parse a MultipartFile line by line and Count the total number of lines in Java
I am trying to parse a MultipartFile line by line, and also count the total number of lines as it goes. Here's the snippet:
var inputStream = file.getInputStream();
var stream = new BufferedReader(
new…

JackOuttaBox
- 345
- 5
- 12
-2
votes
1 answer
How to insert MultipartFile photo into DB as Base64 String in Java Spring boot and display it on the main screen back from the db
How to insert MultipartFile photo into DB as Base64 String in Java Spring boot and display it on the main screen back from the db.

Ahmed Mohamed
- 49
- 1
- 7
-2
votes
2 answers
MultipartFile is always NULL
I'm having a problem when uploading a file using MultipartFile. I'm using Spring v2.2.6.RELEASE
whenever i upload i get the value string but the file is NULL. Here's my code below
UploadController.java
@POST
…

Dominic Hong
- 27
- 6