-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
in \index.d.ts
export interface Header {
"x-chunk-number": number;
"x-chunk-total-number": number;
"x-chunk-size": number;
"x-file-name": string;
"x-file-size": number;
"x-file-identity": string;
"custom": Object
}
in \src\index.js
constructor(props) {
this.data = {
path: String(props.path),
size: parseInt(props.size),
fileName: String(props.fileName),
fileSize: parseInt(props.fileSize),
fileIdentity: this.generateFileIdentity(),
fileShortId: null,
destinationPath: RNFS.TemporaryDirectoryPath,
totalNumber: 0,
custom: props.custom,
};
getHeaders(index) {
return {
"x-chunk-number" : index,
"x-chunk-total-number" : this.data.totalNumber,
"x-chunk-size" : this.data.size,
"x-file-name" : this.data.fileName,
"x-file-size" : this.data.fileSize,
"x-file-identity" : this.data.fileIdentity,
"custom": this.data.custom
}
}
Metadata
Metadata
Assignees
Labels
No labels