Use an ISODate for deleted file names
This commit is contained in:
@@ -184,7 +184,7 @@ async function deleteFile(bucketName, key) {
|
||||
await file.copy(
|
||||
storage
|
||||
.bucket(`${bucketName}${settings.filestore.gcs.deletedBucketSuffix}`)
|
||||
.file(`${key}-${new Date()}`)
|
||||
.file(`${key}-${new Date().toISOString()}`)
|
||||
)
|
||||
}
|
||||
if (settings.filestore.gcs.unlockBeforeDelete) {
|
||||
|
||||
@@ -453,7 +453,7 @@ describe('Filestore', function() {
|
||||
await TestHelper.expectPersistorToHaveFile(
|
||||
app.persistor,
|
||||
`${Settings.filestore.stores.user_files}-deleted`,
|
||||
`${projectId}/${fileId}-${date}`,
|
||||
`${projectId}/${fileId}-${date.toISOString()}`,
|
||||
content
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user