diff --git a/plugins/tiddlywiki/multiwikiserver/modules/store/attachments.js b/plugins/tiddlywiki/multiwikiserver/modules/store/attachments.js index 135c0262a..c35a32568 100644 --- a/plugins/tiddlywiki/multiwikiserver/modules/store/attachments.js +++ b/plugins/tiddlywiki/multiwikiserver/modules/store/attachments.js @@ -69,6 +69,7 @@ AttachmentStore.prototype.saveAttachment = function(options) { fs.writeFileSync(path.resolve(attachmentPath,dataFilename),options.text,contentTypeInfo.encoding); // Save the meta.json file fs.writeFileSync(path.resolve(attachmentPath,"meta.json"),JSON.stringify({ + created: $tw.utils.stringifyDate(new Date()), modified: $tw.utils.stringifyDate(new Date()), contentHash: contentHash, filename: dataFilename, @@ -94,6 +95,7 @@ AttachmentStore.prototype.adoptAttachment = function(incomingFilepath,type,hash) fs.renameSync(incomingFilepath,dataFilepath); // Save the meta.json file fs.writeFileSync(path.resolve(attachmentPath,"meta.json"),JSON.stringify({ + created: $tw.utils.stringifyDate(new Date()), modified: $tw.utils.stringifyDate(new Date()), contentHash: hash, filename: dataFilename, @@ -137,4 +139,4 @@ AttachmentStore.prototype.getAttachmentStream = function(attachment_name) { exports.AttachmentStore = AttachmentStore; -})(); \ No newline at end of file +})();