FileUploadDirectives

pl.iterators.stir.server.directives.FileUploadDirectives$
See theFileUploadDirectives companion trait

Attributes

Companion
trait
Source
FileUploadDirectives.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Inherited methods

def fileUpload(fieldName: String): Directive1[(FileInfo, Stream[IO, Byte])]

Collects each body part that is a multipart file as a tuple containing metadata and a 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.

Collects each body part that is a multipart file as a tuple containing metadata and a 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.

Attributes

Inherited from:
FileUploadDirectives
Source
FileUploadDirectives.scala
def fileUploadAll(fieldName: String): Directive1[Seq[(FileInfo, Stream[IO, Byte])]]

Collects each body part that is a multipart file as a tuple containing metadata and a 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.

Collects each body part that is a multipart file as a tuple containing metadata and a 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.

Attributes

Inherited from:
FileUploadDirectives
Source
FileUploadDirectives.scala
def storeUploadedFile(fieldName: String, destFn: FileInfo => File): Directive[(FileInfo, File)]

Streams the bytes of the file submitted using multipart with the given file name into a designated file on disk. If there is an error writing to disk the request will be failed with the thrown exception, 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.

Streams the bytes of the file submitted using multipart with the given file name into a designated file on disk. If there is an error writing to disk the request will be failed with the thrown exception, 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.

Attributes

Inherited from:
FileUploadDirectives
Source
FileUploadDirectives.scala
def storeUploadedFiles(fieldName: String, destFn: FileInfo => File): Directive1[Seq[(FileInfo, File)]]

Streams the bytes of the file submitted using multipart with the given field name into designated files on disk. If there is an error writing to disk the request will be failed with the thrown exception, if there is no such field the request will be rejected. Stored files are cleaned up on exit but not on failure.

Streams the bytes of the file submitted using multipart with the given field name into designated files on disk. If there is an error writing to disk the request will be failed with the thrown exception, if there is no such field the request will be rejected. Stored files are cleaned up on exit but not on failure.

Attributes

Inherited from:
FileUploadDirectives
Source
FileUploadDirectives.scala