@xuda.io/drive_module 1.1.1382 → 1.1.1383
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +3 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1080,7 +1080,9 @@ export const upload_drive_file = async (req, job_id, headers, file_obj) => {
|
|
|
1080
1080
|
let originalname = path.basename(file_obj.originalname);
|
|
1081
1081
|
const tempPath = file_obj.path;
|
|
1082
1082
|
|
|
1083
|
-
|
|
1083
|
+
const validation_ret = file_upload_validator(file_obj.originalname);
|
|
1084
|
+
|
|
1085
|
+
if (!validation_ret.valid) {
|
|
1084
1086
|
await fs_module.unlink(tempPath);
|
|
1085
1087
|
throw new Error(`Only ${_conf.allowedExts_drive.toString()} files are allowed!`);
|
|
1086
1088
|
}
|