mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-05 01:47:06 +00:00
Include bagname in tiddler Etags
This commit is contained in:
@@ -244,7 +244,7 @@ Get an attachment ready to stream. Returns null if there is an error or:
|
||||
tiddler_id: revision of tiddler
|
||||
stream: stream of file
|
||||
type: type of file
|
||||
Returns {tiddler_id:}
|
||||
Returns {tiddler_id:,bag_name:}
|
||||
*/
|
||||
SqlTiddlerStore.prototype.getBagTiddlerStream = function(title,bag_name) {
|
||||
const tiddlerInfo = this.sqlTiddlerDatabase.getBagTiddler(title,bag_name);
|
||||
@@ -253,7 +253,10 @@ SqlTiddlerStore.prototype.getBagTiddlerStream = function(title,bag_name) {
|
||||
return $tw.utils.extend(
|
||||
{},
|
||||
this.attachmentStore.getAttachmentStream(tiddlerInfo.attachment_blob),
|
||||
{tiddler_id: tiddlerInfo.tiddler_id});
|
||||
{
|
||||
tiddler_id: tiddlerInfo.tiddler_id
|
||||
}
|
||||
);
|
||||
} else {
|
||||
const { Readable } = require('stream');
|
||||
const stream = new Readable();
|
||||
@@ -266,6 +269,7 @@ SqlTiddlerStore.prototype.getBagTiddlerStream = function(title,bag_name) {
|
||||
};
|
||||
return {
|
||||
tiddler_id: tiddlerInfo.tiddler_id,
|
||||
bag_name: bag_name,
|
||||
stream: stream,
|
||||
type: tiddlerInfo.tiddler.type || "text/plain"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user