mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Fix the checkIfFileExists API.
This commit is contained in:
parent
3b6270236c
commit
81a7203315
1 changed files with 1 additions and 0 deletions
|
@ -80,6 +80,7 @@ module.exports =
|
|||
logger.log bucketName:bucketName, key:key, "check file existence in s3"
|
||||
s3.headObject {Bucket: bucketName, Key: key}, (err, data) ->
|
||||
if err?
|
||||
return (callback null, false) if err.code == 'NotFound'
|
||||
logger.err err:err, bucketName:bucketName, key:key, "something went wrong checking head in s3"
|
||||
return callback err
|
||||
callback null, data.ETag?
|
||||
|
|
Loading…
Reference in a new issue