mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 15:08:46 +00:00
파일 생성 시각 및 파일 마지막 수정 시각을 저장하도록 변경
파일 마지막 수정 시각은 반드시 지정되어야 하며, 파일 시스템에서 읽어옵니다. 파일 생성 시각은 선택적으로 지정될 수 있으며, 이미지일 경우 EXIF에서 추출을 시도합니다. 두 값 모두 클라이언트에서 암호화되어 서버에 저장됩니다.
This commit is contained in:
@@ -16,8 +16,16 @@ export const GET: RequestHandler = async ({ locals, params }) => {
|
||||
if (!zodRes.success) error(400, "Invalid path parameters");
|
||||
const { id } = zodRes.data;
|
||||
|
||||
const { mekVersion, encDek, dekVersion, contentType, encContentIv, encName } =
|
||||
await getFileInformation(userId, id);
|
||||
const {
|
||||
mekVersion,
|
||||
encDek,
|
||||
dekVersion,
|
||||
contentType,
|
||||
encContentIv,
|
||||
encName,
|
||||
encCreatedAt,
|
||||
encLastModifiedAt,
|
||||
} = await getFileInformation(userId, id);
|
||||
return json(
|
||||
fileInfoResponse.parse({
|
||||
mekVersion,
|
||||
@@ -27,6 +35,10 @@ export const GET: RequestHandler = async ({ locals, params }) => {
|
||||
contentIv: encContentIv,
|
||||
name: encName.ciphertext,
|
||||
nameIv: encName.iv,
|
||||
createdAt: encCreatedAt?.ciphertext,
|
||||
createdAtIv: encCreatedAt?.iv,
|
||||
lastModifiedAt: encLastModifiedAt.ciphertext,
|
||||
lastModifiedAtIv: encLastModifiedAt.iv,
|
||||
} satisfies FileInfoResponse),
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user