mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Copy linkedFileData when cloning a project
This commit is contained in:
parent
d36dbfda07
commit
5abb745e05
1 changed files with 4 additions and 1 deletions
|
@ -55,7 +55,10 @@ module.exports = ProjectEntityUpdateHandler = self =
|
||||||
logger.err { project_id, folder_id, originalProject_id, origonalFileRef }, "file trying to copy is null"
|
logger.err { project_id, folder_id, originalProject_id, origonalFileRef }, "file trying to copy is null"
|
||||||
return callback()
|
return callback()
|
||||||
# convert any invalid characters in original file to '_'
|
# convert any invalid characters in original file to '_'
|
||||||
fileRef = new File name : SafePath.clean(origonalFileRef.name)
|
fileProperties = name : SafePath.clean(origonalFileRef.name)
|
||||||
|
if origonalFileRef.linkedFileData?
|
||||||
|
fileProperties.linkedFileData = origonalFileRef.linkedFileData
|
||||||
|
fileRef = new File(fileProperties)
|
||||||
FileStoreHandler.copyFile originalProject_id, origonalFileRef._id, project._id, fileRef._id, (err, fileStoreUrl)->
|
FileStoreHandler.copyFile originalProject_id, origonalFileRef._id, project._id, fileRef._id, (err, fileStoreUrl)->
|
||||||
if err?
|
if err?
|
||||||
logger.err { err, project_id, folder_id, originalProject_id, origonalFileRef }, "error coping file in s3"
|
logger.err { err, project_id, folder_id, originalProject_id, origonalFileRef }, "error coping file in s3"
|
||||||
|
|
Loading…
Reference in a new issue