public interface FileUploadDirectives
Modifier and Type | Method and Description |
---|---|
Directive<scala.Tuple1<scala.Tuple2<FileInfo,org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>>> |
fileUpload(java.lang.String fieldName)
Collects each body part that is a multipart file as a tuple containing metadata and a
Source
for streaming the file contents somewhere. |
Directive<scala.Tuple1<scala.collection.immutable.Seq<scala.Tuple2<FileInfo,org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>>>> |
fileUploadAll(java.lang.String fieldName)
Collects each body part that is a multipart file as a tuple containing metadata and a
Source
for streaming the file contents somewhere. |
Directive<scala.Tuple2<FileInfo,java.io.File>> |
storeUploadedFile(java.lang.String fieldName,
scala.Function1<FileInfo,java.io.File> destFn)
Streams the bytes of the file submitted using multipart with the given file name into a designated file on disk.
|
Directive<scala.Tuple1<scala.collection.immutable.Seq<scala.Tuple2<FileInfo,java.io.File>>>> |
storeUploadedFiles(java.lang.String fieldName,
scala.Function1<FileInfo,java.io.File> destFn)
Streams the bytes of the file submitted using multipart with the given field name into designated files on disk.
|
Directive<scala.Tuple2<FileInfo,java.io.File>> storeUploadedFile(java.lang.String fieldName, scala.Function1<FileInfo,java.io.File> destFn)
fieldName
- (undocumented)destFn
- (undocumented)Directive<scala.Tuple1<scala.collection.immutable.Seq<scala.Tuple2<FileInfo,java.io.File>>>> storeUploadedFiles(java.lang.String fieldName, scala.Function1<FileInfo,java.io.File> destFn)
fieldName
- (undocumented)destFn
- (undocumented)Directive<scala.Tuple1<scala.Tuple2<FileInfo,org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>>> fileUpload(java.lang.String fieldName)
Source
for streaming the file contents somewhere. If there is no such field the request will be rejected,
if there are multiple file parts with the same name, the first one will be used and the subsequent
ones ignored.
fieldName
- (undocumented)Directive<scala.Tuple1<scala.collection.immutable.Seq<scala.Tuple2<FileInfo,org.apache.pekko.stream.scaladsl.Source<org.apache.pekko.util.ByteString,java.lang.Object>>>>> fileUploadAll(java.lang.String fieldName)
Source
for streaming the file contents somewhere. If there is no such field the request will be rejected.
Files are buffered into temporary files on disk so in-memory buffers don't overflow. The temporary
files are cleaned up once materialized, or on exit if the stream is not consumed.
fieldName
- (undocumented)