This commit is contained in:
Nick Winter 2014-03-03 18:51:05 -08:00
commit ebf6adb596
2 changed files with 4 additions and 4 deletions

View file

@ -39,6 +39,7 @@ class LiveEditingMarkup extends TreemaNode.nodeMap.ace
filename: InkBlob.filename
mimetype: InkBlob.mimetype
path: @settings.filePath
force: true
@uploadingPath = [@settings.filePath, InkBlob.filename].join('/')
$.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })
@ -147,9 +148,8 @@ class SoundFileTreema extends TreemaNode.nodeMap.string
filename: InkBlob.filename
mimetype: InkBlob.mimetype
path: @settings.filePath
force: true
# Automatically overwrite if the same path was put in here before
body.force = true # if InkBlob.filename is @data
@uploadingPath = [@settings.filePath, InkBlob.filename].join('/')
$.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })
@ -185,9 +185,8 @@ class ImageFileTreema extends TreemaNode.nodeMap.string
filename: InkBlob.filename
mimetype: InkBlob.mimetype
path: @settings.filePath
force: true
# Automatically overwrite if the same path was put in here before
body.force = true # if InkBlob.filename is @data
@uploadingPath = [@settings.filePath, InkBlob.filename].join('/')
$.ajax('/file', { type: 'POST', data: body, success: @onFileUploaded })

View file

@ -13,6 +13,7 @@ module.exports.setup = (app) ->
fileGet = (req, res) ->
path = req.path[6..]
path = decodeURI path
isFolder = false
try
objectId = mongoose.Types.ObjectId(path)