Move directory key validation into FileHandler

This commit is contained in:
Simon Detheridge
2020-03-14 14:31:30 +00:00
parent 58db14456a
commit fc80aa3954
5 changed files with 32 additions and 28 deletions
@@ -40,8 +40,6 @@ settings =
apiEndpoint: process.env['GCS_API_ENDPOINT']
apiScheme: process.env['GCS_API_SCHEME']
projectId: process.env['GCS_PROJECT_ID']
# only keys that match this regex can be deleted
directoryKeyRegex: new RegExp(process.env['GCS_DIRECTORY_KEY_REGEX'] || "^[0-9a-fA-F]{24}/[0-9a-fA-F]{24}")
unlockBeforeDelete: process.env['GCS_UNLOCK_BEFORE_DELETE'] == "true" # unlock an event-based hold before deleting. default false
deletedBucketSuffix: process.env['GCS_DELETED_BUCKET_SUFFIX'] # if present, copy file to another bucket on delete. default null