29 lines
921 B
JavaScript
29 lines
921 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const assert_1 = require("oak-domain/lib/utils/assert");
|
|
const Exception_1 = require("../../types/Exception");
|
|
class Unknown {
|
|
name = 'unknown';
|
|
autoInform() {
|
|
return false;
|
|
}
|
|
getConfig(application) {
|
|
return {};
|
|
}
|
|
formKey(extraFile) {
|
|
const { id, extension, objectId } = extraFile;
|
|
(0, assert_1.assert)(objectId);
|
|
return `extraFile/${objectId}${extension ? '.' + extension : ''}`;
|
|
}
|
|
async upload(options) {
|
|
const { extraFile, uploadFn, file, uploadToAspect, getPercent } = options;
|
|
throw new Exception_1.OakUploadException('unknown未实现上传');
|
|
}
|
|
// 类型unknown 只能从extra1取值
|
|
composeFileUrl(options) {
|
|
const { application, extraFile, style } = options;
|
|
return extraFile.extra1;
|
|
}
|
|
}
|
|
exports.default = Unknown;
|