Merge pull request #104 from overleaf/spd-custom-bucket-fallback

Fix fallback to custom s3 buckets
This commit is contained in:
Simon Detheridge 2020-03-19 11:39:55 +00:00 committed by GitHub
commit 63b4b3e9a2
2 changed files with 2 additions and 2 deletions

View file

@ -115,7 +115,7 @@ module.exports = function(primary, fallback) {
}
function _getFallbackBucket(bucket) {
return Settings.filestore.fallback.buckets[bucket]
return Settings.filestore.fallback.buckets[bucket] || bucket
}
function _wrapFallbackMethod(method) {

View file

@ -374,7 +374,7 @@ describe('Filestore', function() {
})
})
if (backend === 'S3Persistor') {
if (backend === 'S3Persistor' || backend === 'FallbackGcsToS3Persistor') {
describe('with a file in a specific bucket', function() {
let constantFileContent, fileId, fileUrl, bucketName