@prezly/uploads
Version:
Types and utilities to handle uploaded files & images in Prezly
12 lines (9 loc) • 534 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isUploadedFile = isUploadedFile;
var _isObject = require("./isObject.cjs");
function isUploadedFile(file) {
return (0, _isObject.isObject)(file) && typeof file.uuid === 'string' && typeof file.version === 'number' && typeof file.size === 'number' && typeof file.mime_type === 'string' && typeof file.filename === 'string' && file.version > 0 && file.uuid.length > 0 && file.size > 0 && file.mime_type.length > 0 && file.filename.length > 0;
}