Open iompo opened 3 years ago
/cc @evanchooly
Thanks for reporting!
Can you please share a reproducer project?
Thanks.
It appears that RESTEasy Classic does not write the content of the multipart request to the file system, but leaves that task to the user. Is that correct @ronsigal ?
Have the same problem. How to get this work ?
It doesn't work at the moment
cc @jamezp
I assume the goal here is to write data to a file. Currently RESTEasy uses Apache mime4j to process multipart data. It uses a ThresholdStorageProvider
which stores data in memory if it's small enough, defaults to 1024 bytes. If that is surpassed then the data will be written to a file. However, it does look like there currently isn't a way to define where the temporary file is created. Is this what we're after here?
Exactly
Okay. We've got some changes coming up along these lines. We could add this too. However, the 4.7.x branch really isn't getting more features. We could consider it for 5.x, but RESTEasy has moved past Jakarta REST 2.1 to Jakarta REST 3.1 and eventually 4.0.
Understood, thanks
Has this perhaps been fixed with the latest versions of RESTEasy?
@geoand I apologize it looks like this never got looked at. I've filed https://issues.redhat.com/browse/RESTEASY-3542 for this. Currently everything just uses the java.io.tmpdir
.
🙏🏽
I have a REST endpoint that receives a multipart containing a file. I tried to define a custom temporary folder where to store that file, using the property quarkus.http.body-handler.uploads-directory. When the server receives the rest request the file contained in the multipart is stored in the file system temp folder and not in the one specified by the property. This is my REST endpoint:
the multipart BinaryRequestBody:
and the application.properties:
Expected behavior
The file contained in the BinaryRequestBody object should be stored into /home/tempFolder
Actual behavior
The file contained in the BinaryRequestBody is stored in the default temp directory
Quarkus version or git rev
1.13.7.Final
Build tool
Gradle 6.8.3 Kotlin: 1.4.20 Groovy: 2.5.12 JVM: 11.0.10 (AdoptOpenJDK 11.0.10+9) OS: Mac OS X 10.16 x86_64