类 DefaultParts.DefaultFilePart

所有已实现的接口:
FilePart, Part
封闭类:
DefaultParts

private static class DefaultParts.DefaultFilePart extends DefaultParts.DefaultPart implements FilePart
Default implementation of FilePart.
  • 构造器详细资料

  • 方法详细资料

    • filename

      public String filename()
      从接口复制的说明: FilePart
      Return the original filename in the client's filesystem.

      Note: Please keep in mind this filename is supplied by the client and should not be used blindly. In addition to not using the directory portion, the file name could also contain characters such as ".." and others that can be used maliciously. It is recommended to not use this filename directly. Preferably generate a unique one and save this one one somewhere for reference, if necessary.

      指定者:
      filename 在接口中 FilePart
      返回:
      the original filename, or the empty String if no file has been chosen in the multipart form, or null if not defined or not available
      另请参阅:
    • transferTo

      public reactor.core.publisher.Mono<Void> transferTo(Path dest)
      从接口复制的说明: FilePart
      Convenience method to copy the content of the file in this part to the given destination file. If the destination file already exists, it will be truncated first.
      指定者:
      transferTo 在接口中 FilePart
      参数:
      dest - the target file
      返回:
      completion Mono with the result of the file transfer, possibly IllegalStateException if the part isn't a file
      另请参阅:
    • toString

      public String toString()
      覆盖:
      toString 在类中 DefaultParts.DefaultPart