title: How to upload a folder
body: <p>when I was writing the code, I encountered a headache that caused me to need to upload a folder. My front-end partner did give me a folder, but I couldn't get the name of the folder, so I couldn't create a folder.</p>
  <pre class="lang-java prettyprint-override"><code>@PostMapping(&quot;/upload&quot;)
      @Operation(summary = &quot;upload file&quot;)
      public Result upload(@RequestPart MultipartFile[] files, Folder folder){
          log.info(&quot;upload--&gt;{}&quot;,&quot;start&quot;);
          log.info(&quot;Upload root path--&gt;{}&quot;,folder.getRootPath());
          for (MultipartFile file : files) {
              String filename = file.getOriginalFilename();
              log.debug(&quot;File name--&gt;{}&quot;,filename);
              String type = file.getContentType();
              log.debug(&quot;File type--&gt;{}&quot;,type);
              log.debug(&quot;File Name--&gt;{}&quot;,file.getOriginalFilename());
          }
          log.info(&quot;upload--&gt;{}&quot;,&quot;en&quot;);
          return new Result().result200(&quot;end&quot;,request.getRequestURI());
      }
  </code></pre>