Multipart

play.core.formatters.Multipart
object Multipart

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Multipart.type

Members list

Value members

Concrete methods

def escapeParamWithHTML5Strategy(value: String): String

Helper function to escape a single header parameter using the HTML5 strategy. (The alternative would be the strategy defined by RFC5987) Particularly useful for Content-Disposition header parameters which might contain non-ASCII values, like file names. This follows the "WHATWG HTML living standard" section 4.10.21.8 and matches the behavior of curl and modern browsers. See https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data

Helper function to escape a single header parameter using the HTML5 strategy. (The alternative would be the strategy defined by RFC5987) Particularly useful for Content-Disposition header parameters which might contain non-ASCII values, like file names. This follows the "WHATWG HTML living standard" section 4.10.21.8 and matches the behavior of curl and modern browsers. See https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data

Attributes

def format(boundary: String, nioCharset: Charset, chunkSize: Int): Flow[Part[Source[ByteString, _]], ByteString, NotUsed]

Provides a Formatting Flow which could be used to format a MultipartFormData.Part source to a multipart/form data body

Provides a Formatting Flow which could be used to format a MultipartFormData.Part source to a multipart/form data body

Attributes

def randomBoundary(length: Int, random: Random): String

Creates a new random number of the given length and base64 encodes it (using a custom "safe" alphabet).

Creates a new random number of the given length and base64 encodes it (using a custom "safe" alphabet).

Attributes

Throws
java.lang.IllegalArgumentException

if the length is greater than 70 or less than 1 as specified in rfc2046

def transform(body: Source[Part[Source[ByteString, _]], _], boundary: String): Source[ByteString, _]

Transforms a Source[MultipartFormData.Part] to a Source[ByteString]

Transforms a Source[MultipartFormData.Part] to a Source[ByteString]

Attributes