Update migrate.ts
This commit is contained in:
parent
c2acb9d4a2
commit
747bf3bb85
@ -195,7 +195,7 @@ async function main() {
|
|||||||
_id: file.metadata.userId
|
_id: file.metadata.userId
|
||||||
});
|
});
|
||||||
if (user == null) return;
|
if (user == null) return;
|
||||||
if (file.metadata.storage && file.metadata.storage.key) { // when object storage
|
if (file.metadata.storageProps && file.metadata.storageProps.key) { // when object storage
|
||||||
await DriveFiles.save({
|
await DriveFiles.save({
|
||||||
id: file._id.toHexString(),
|
id: file._id.toHexString(),
|
||||||
userId: user._id.toHexString(),
|
userId: user._id.toHexString(),
|
||||||
@ -208,7 +208,7 @@ async function main() {
|
|||||||
size: file.length,
|
size: file.length,
|
||||||
url: file.metadata.url,
|
url: file.metadata.url,
|
||||||
uri: file.metadata.uri,
|
uri: file.metadata.uri,
|
||||||
accessKey: file.metadata.storage.key,
|
accessKey: file.metadata.storageProps.key,
|
||||||
folderId: file.metadata.folderId ? file.metadata.folderId.toHexString() : null,
|
folderId: file.metadata.folderId ? file.metadata.folderId.toHexString() : null,
|
||||||
storedInternal: false,
|
storedInternal: false,
|
||||||
isLink: false
|
isLink: false
|
||||||
|
Loading…
Reference in New Issue
Block a user