@muhgholy/next-drive 4.21.0 → 4.22.0
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/dist/{chunk-FWX344WM.js → chunk-CR3QW3QN.js} +6 -3
- package/dist/chunk-CR3QW3QN.js.map +1 -0
- package/dist/{chunk-TBBX3C6E.cjs → chunk-EUAHSB2J.cjs} +6 -3
- package/dist/chunk-EUAHSB2J.cjs.map +1 -0
- package/dist/server/controllers/drive.d.ts +1 -0
- package/dist/server/controllers/drive.d.ts.map +1 -1
- package/dist/server/database/mongoose/schema/drive.d.ts +1 -0
- package/dist/server/database/mongoose/schema/drive.d.ts.map +1 -1
- package/dist/server/express.cjs +11 -11
- package/dist/server/express.js +2 -2
- package/dist/server/hono.cjs +11 -11
- package/dist/server/hono.js +2 -2
- package/dist/server/index.cjs +13 -13
- package/dist/server/index.js +1 -1
- package/dist/types/lib/database/drive.d.ts +1 -0
- package/dist/types/lib/database/drive.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FWX344WM.js.map +0 -1
- package/dist/chunk-TBBX3C6E.cjs.map +0 -1
|
@@ -36,6 +36,7 @@ var DriveSchema = new Schema(
|
|
|
36
36
|
information: { type: informationSchema, required: true },
|
|
37
37
|
status: { type: String, enum: ["READY", "PROCESSING", "UPLOADING", "FAILED"], default: "PROCESSING" },
|
|
38
38
|
trashedAt: { type: Date, default: null },
|
|
39
|
+
meta: { type: Schema.Types.Mixed, default: {} },
|
|
39
40
|
createdAt: { type: Date, default: Date.now }
|
|
40
41
|
},
|
|
41
42
|
{ minimize: false }
|
|
@@ -59,6 +60,7 @@ DriveSchema.method("toClient", async function() {
|
|
|
59
60
|
information: data.information,
|
|
60
61
|
status: data.status,
|
|
61
62
|
trashedAt: data.trashedAt,
|
|
63
|
+
meta: data.meta,
|
|
62
64
|
createdAt: data.createdAt
|
|
63
65
|
};
|
|
64
66
|
});
|
|
@@ -1629,7 +1631,8 @@ var driveUpload = async (source, key, options) => {
|
|
|
1629
1631
|
parentId: resolvedParentId,
|
|
1630
1632
|
order: await getNextOrderValue(key),
|
|
1631
1633
|
information: { type: "FILE", sizeInBytes: fileSize, mime: mimeType, path: "" },
|
|
1632
|
-
status: "UPLOADING"
|
|
1634
|
+
status: "UPLOADING",
|
|
1635
|
+
meta: options.meta || {}
|
|
1633
1636
|
});
|
|
1634
1637
|
if (provider.name === "LOCAL" && drive.information.type === "FILE") {
|
|
1635
1638
|
drive.information.path = path.join("file", String(drive._id), "data.bin");
|
|
@@ -2402,5 +2405,5 @@ var driveAPIHandler = async (req, res) => {
|
|
|
2402
2405
|
};
|
|
2403
2406
|
|
|
2404
2407
|
export { driveAPIHandler, driveConfiguration, driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveInfo, driveList, driveReadFile, driveUpload, getDriveConfig, getDriveInformation };
|
|
2405
|
-
//# sourceMappingURL=chunk-
|
|
2406
|
-
//# sourceMappingURL=chunk-
|
|
2408
|
+
//# sourceMappingURL=chunk-CR3QW3QN.js.map
|
|
2409
|
+
//# sourceMappingURL=chunk-CR3QW3QN.js.map
|