fix: add modified value for object

This commit is contained in:
2026-08-16 15:40:42 +07:00
parent 478095f2b7
commit 92d4da14ed
4 changed files with 26 additions and 6 deletions
+3 -1
View File
@@ -11,7 +11,7 @@ interface GoogleDriveCreateResponse {
id: string;
}
const DRIVE_FIELDS = "id,name,size,mimeType,md5Checksum";
const DRIVE_FIELDS = "id,name,size,mimeType,md5Checksum,modifiedTime";
const FOLDER_MIME_TYPE = "application/vnd.google-apps.folder";
const LIST_NODE_CAP = 5000;
@@ -227,6 +227,7 @@ export async function streamDownloadFromDrive(accessToken: string, bucket: strin
size: parseInt(file.size || "0", 10),
id: file.id,
md5Checksum: file.md5Checksum,
modifiedTime: file.modifiedTime,
status: downloadRes.status,
contentRange: downloadRes.headers.get("Content-Range") ?? undefined,
contentLength: downloadRes.headers.get("Content-Length") ?? undefined,
@@ -264,6 +265,7 @@ export async function getFileMetadata(accessToken: string, bucket: string, objec
mimeType: file.mimeType || "application/octet-stream",
size: parseInt(file.size || "0", 10),
md5Checksum: file.md5Checksum,
modifiedTime: file.modifiedTime,
};
}