Commit 35d1966d by Calen Pennington

Merge pull request #813 from MITx/feature/cdodge/asset-id-change

add a 'safety switch' where we add new content into GridFS with a filena...
parents baaafb9d ebf6d076
......@@ -28,9 +28,10 @@ class MongoContentStore(ContentStore):
if self.fs.exists({"_id" : id}):
self.fs.delete(id)
with self.fs.new_file(_id = id, content_type=content.content_type, displayname=content.name) as fp:
with self.fs.new_file(_id = id, filename=content.get_url_path(), content_type=content.content_type, displayname=content.name) as fp:
fp.write(content.data)
return content
return content
def find(self, location):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment