Repository: quarkusio/quarkus
Issue: NoSuchFileException when uploading file after a while

### Describe the bug

Dear Quarkus community,

When using Multipart File Upload feature of RestEasy Reactive, it uses by default ${java.io.tmpdir}/uploads to temporary store the uploaded files.

It seems in my system at least there are some cleaning tasks and from time to time this subdirectory named "uploads" gets deleted.
In that scenario, files cannot be uploaded anymore, with the following exception:

`2021-09-30 09:21:16,634 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-2) Request failed: java.lang.RuntimeException: java.nio.file.NoSuchFileException: /tmp/uploads/resteasy-reactive1643737138058622276upload
	at org.jboss.resteasy.reactive.server.core.multipart.MultiPartParserDefinition$MultiPartUploadHandler.beginPart(MultiPartParserDefinition.java:247)
	at org.jboss.resteasy.reactive.server.core.multipart.MultipartParser$ParseState.headerName(MultipartParser.java:184)
	at org.jboss.resteasy.reactive.server.core.multipart.MultipartParser$ParseState.parse(MultipartParser.java:99)
	at org.jboss.resteasy.reactive.server.core.multipart.MultiPartParserDefinition$MultiPartUploadHandler.parseBlocking(MultiPartParserDefinition.java:218)
	at org.jboss.resteasy.reactive.server.handlers.FormBodyHandler.handle(FormBodyHandler.java:88)
	at org.jboss.resteasy.reactive.server.handlers.FormBodyHandler.handle(FormBodyHandler.java:25)
	at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:141)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.nio.file.NoSuchFileException: /tmp/uploads/resteasy-reactive1643737138058622276upload
	at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
	at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
	at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
	at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
	at java.base/java.nio.file.Files.createFile(Files.java:652)
	at java.base/java.nio.file.TempFileHelper.create(TempFileHelper.java:135)
	at java.base/java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:158)
	at java.base/java.nio.file.Files.createTempFile(Files.java:872)
	at org.jboss.resteasy.reactive.server.core.multipart.MultiPartParserDefinition$MultiPartUploadHandler.beginPart(MultiPartParserDefinition.java:240)
	... 13 more`

If I manually recreate the /tmp/uploads directory, then everything works again, even without restarting the java service.

Regards,


### Expected behavior

As by default the file upload feature requires a subdirectory of the temp directory, it should be checked if the subdirectory still exists

### Actual behavior

At startup the subdirectory /tmp/uploads is created, but Quarkus fails to receive document if this directory gets deleted.

### How to Reproduce?

1. Run the File upload example service
2. Delete /tmp/uploads directory that it creates
3. Try to upload a new document
4. See the exception
5. Re-create the /tmp/uploads directory
6. Upload a document
7. Sees it's working again.

### Output of `uname -a` or `ver`

Linux test.dont-code.net 5.6.6-300.fc32.x86_64 #1 SMP Tue Apr 21 13:44:19 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

### Output of `java -version`

openjdk version "16.0.1" 2021-04-20 OpenJDK Runtime Environment 21.3 (build 16.0.1+9) OpenJDK 64-Bit Server VM 21.3 (build 16.0.1+9, mixed mode, sharing)

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

Quarkus 2.2.1.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java

diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java
index 907013bf7d5..f03cdf0598a 100644
--- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java
+++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java
@@ -237,6 +237,7 @@ public void beginPart(final CaseInsensitiveMap<String> headers) {
                     if (fileName != null && fileSizeThreshold == 0) {
                         try {
                             if (tempFileLocation != null) {
+                                Files.createDirectories(tempFileLocation);
                                 file = Files.createTempFile(tempFileLocation, "resteasy-reactive", "upload");
                             } else {
                                 file = Files.createTempFile("resteasy-reactive", "upload");
@@ -266,6 +267,7 @@ public void data(final ByteBuffer buffer) throws IOException {
             if (file == null && fileName != null && fileSizeThreshold < this.currentFileSize) {
                 try {
                     if (tempFileLocation != null) {
+                        Files.createDirectories(tempFileLocation);
                         file = Files.createTempFile(tempFileLocation, "resteasy-reactive", "upload");
                     } else {
                         file = Files.createTempFile("resteasy-reactive", "upload");