2019-03-11 13:49:38 +05:30
|
|
|
import { Range } from "./Range";
|
2019-03-11 13:41:55 +05:30
|
|
|
import { Stream } from "stream";
|
2019-03-26 17:17:10 +05:30
|
|
|
export interface Content {
|
2019-03-11 13:41:55 +05:30
|
|
|
/**
|
|
|
|
* Returns a readable stream based on the provided range (optional).
|
|
|
|
* @param {Range} range The start-end range of stream data.
|
|
|
|
* @returns {Stream} A readable stream
|
|
|
|
*/
|
|
|
|
getStream(range?: Range): Stream;
|
|
|
|
/**
|
|
|
|
* Total size of the content
|
|
|
|
*/
|
|
|
|
readonly totalSize: number;
|
|
|
|
/**
|
|
|
|
* Mime type to be sent in Content-Type header
|
|
|
|
*/
|
|
|
|
readonly mimeType: string;
|
|
|
|
/**
|
|
|
|
* File name to be sent in Content-Disposition header
|
|
|
|
*/
|
|
|
|
readonly fileName: string;
|
|
|
|
};
|