@injectable/file-hosting-service
v2.0.0
Published
service for hosting files with compress option
Downloads
19
Readme
File Hosting Service
Service for hosting files with compress option.
This package works with the Injectable Core.
Functions
Registers an id for a file.
public registerFileId(): number
Hosts an node buffer on a route.
public setFile(
injectableName: string,
fileId: number,
route: string,
buffer: Buffer,
encodings: Array<Encoding>,
onRequest?: OnRequest
): number
Hosts the file from the path on a route.
public setFileFromPath(
injectableName: string,
fileId: number,
route: string,
path: string,
encodings: Array<Encoding>,
onRequest?: OnRequest
): number
Deletes the file (also the path) wth the given id.
public deleteFile(
injectableName: string,
fileId: number
): void
License
See the LICENSE file for license rights and limitations (MIT).