func asyncStreamFile(at path: String, chunkSize: Int = NonBlockingFileIO.defaultChunkSize, mediaType: HTTPMediaType? = nil, advancedETagComparison: Bool = false, onCompleted: @escaping (Result<Void, Error>) async throws -> () = { _ in }) async throws -> Response
Generates a chunked Response for the specified file. This method respects values in the "ETag" header and is capable of responding 304 Not Modified if the file in question has not been modified since last served. If advancedETagComparison is set to true, the response will have its ETag field set to a byte-by-byte hash of the requested file. If set to false, a simple ETag consisting of the last modified date and file size will be used. This method will also set the "Content-Type" header automatically if an appropriate MediaType can be found for the file’s suffix.
func streamFile(at path: String, chunkSize: Int = NonBlockingFileIO.defaultChunkSize, mediaType: HTTPMediaType? = nil, advancedETagComparison: Bool, onCompleted: @escaping (Result<Void, Error>) -> () = { _ in }) -> EventLoopFuture<Response>
Generates a chunked Response for the specified file. This method respects values in the "ETag" header and is capable of responding 304 Not Modified if the file in question has not been modified since last served. If advancedETagComparison is set to true, the response will have its ETag field set to a byte-by-byte hash of the requested file. If set to false, a simple ETag consisting of the last modified date and file size will be used. This method will also set the "Content-Type" header automatically if an appropriate MediaType can be found for the file’s suffix.
@preconcurrency func streamFile(at path: String, chunkSize: Int = NonBlockingFileIO.defaultChunkSize, mediaType: HTTPMediaType? = nil, onCompleted: @escaping (Result<Void, Error>) -> () = { _ in }) -> Response
Generates a chunked Response for the specified file. This method respects values in the "ETag" header and is capable of responding 304 Not Modified if the file in question has not been modified since last served. This method will also set the "Content-Type" header automatically if an appropriate MediaType can be found for the file’s suffix.