file-box
Version:
Pack a File into Box for easy move/transfer between servers no matter of where it is.(local path, remote url, or cloud storage)
34 lines • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FileBoxType = void 0;
/**
* Huan(202002):
* We need to keep this enum number to be consistent
* because of toJSON & fromJSON need the same type number across versoins.
* and gRPC maybe will use those numbers in the future as well.
*/
var FileBoxType;
(function (FileBoxType) {
FileBoxType[FileBoxType["Unknown"] = 0] = "Unknown";
/**
* 1. toJSON() Serializable
* - Base64
* - Url
* - QRCode
* - UUID
*
* 2. toJSON() NOT Serializable: need to convert to FileBoxType.Base64 before call toJSON()
* - Buffer
* - Stream
* - File
*/
FileBoxType[FileBoxType["Base64"] = 1] = "Base64";
FileBoxType[FileBoxType["Url"] = 2] = "Url";
FileBoxType[FileBoxType["QRCode"] = 3] = "QRCode";
FileBoxType[FileBoxType["Buffer"] = 4] = "Buffer";
FileBoxType[FileBoxType["File"] = 5] = "File";
FileBoxType[FileBoxType["Stream"] = 6] = "Stream";
FileBoxType[FileBoxType["Uuid"] = 7] = "Uuid";
})(FileBoxType || (FileBoxType = {}));
exports.FileBoxType = FileBoxType;
//# sourceMappingURL=file-box.type.js.map