Instance Propertyvapor 4.114.1Vapor
multipart
File+Multipart.swift:5var multipart: MultipartPart? { get }
var multipart: MultipartPart? { get }
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct File
Represents a single file.
struct MultipartPart
A single part of a multipart
-encoded message.
init(data: ByteBuffer, filename: String)
Creates a new File
.
init(data: String, filename: String)
Creates a new File
.
init(from decoder: Decoder) throws
Decodable
conformance.
init?(multipart: MultipartPart)
var contentType: HTTPMediaType? { get }
Associated MediaType
for this file’s extension, if it has one.
var data: ByteBuffer
The file’s data.
var `extension`: String? { get }
The file extension, if it has one.
var filename: String
Name of the file, including extension.
func encode(to encoder: Encoder) throws
Encodable
conformance.