Skip to content

Commit 4f9cbf1

Browse files
committed
Added the content uid to the list of the arguments of the 'IVirtualStoredContentManagerMiddleware' methods
1 parent 1c1b1b9 commit 4f9cbf1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/manager/VirtualStoredFSManager.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ export declare abstract class VirtualStoredContentManager implements IVirtualSto
2323
allocate(options: any, callback: ReturnCallback<string>): any;
2424
}
2525
export interface IVirtualStoredContentManagerMiddleware {
26-
readStream(stream: Readable, callback: (stream: Readable) => void): any;
27-
writeStream(stream: Writable, callback: (stream: Writable) => void): any;
26+
readStream(uid: string, stream: Readable, callback: (stream: Readable) => void): any;
27+
writeStream(uid: string, stream: Writable, callback: (stream: Writable) => void): any;
2828
}
2929
export declare class SimpleVirtualStoredContentManager extends VirtualStoredContentManager {
3030
storeFolderPath: string;

lib/manager/VirtualStoredFSManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ var SimpleVirtualStoredContentManager = (function (_super) {
7676
if (!_this.middleware)
7777
callback(null, stream);
7878
else
79-
_this.middleware.readStream(stream, function (s) { return callback(null, s); });
79+
_this.middleware.readStream(contentUid, stream, function (s) { return callback(null, s); });
8080
}
8181
});
8282
};
@@ -91,7 +91,7 @@ var SimpleVirtualStoredContentManager = (function (_super) {
9191
if (!_this.middleware)
9292
callback(null, stream);
9393
else
94-
_this.middleware.writeStream(stream, function (s) { return callback(null, s); });
94+
_this.middleware.writeStream(contentUid, stream, function (s) { return callback(null, s); });
9595
}
9696
});
9797
};

src/manager/VirtualStoredFSManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ export abstract class VirtualStoredContentManager implements IVirtualStoredConte
5656

5757
export interface IVirtualStoredContentManagerMiddleware
5858
{
59-
readStream(stream : Readable, callback : (stream : Readable) => void);
60-
writeStream(stream : Writable, callback : (stream : Writable) => void);
59+
readStream(uid : string, stream : Readable, callback : (stream : Readable) => void);
60+
writeStream(uid : string, stream : Writable, callback : (stream : Writable) => void);
6161
}
6262

6363
export class SimpleVirtualStoredContentManager extends VirtualStoredContentManager
@@ -109,7 +109,7 @@ export class SimpleVirtualStoredContentManager extends VirtualStoredContentManag
109109
if(!this.middleware)
110110
callback(null, stream);
111111
else
112-
this.middleware.readStream(stream, (s) => callback(null, s));
112+
this.middleware.readStream(contentUid, stream, (s) => callback(null, s));
113113
}
114114
})
115115
}
@@ -127,7 +127,7 @@ export class SimpleVirtualStoredContentManager extends VirtualStoredContentManag
127127
if(!this.middleware)
128128
callback(null, stream);
129129
else
130-
this.middleware.writeStream(stream, (s) => callback(null, s));
130+
this.middleware.writeStream(contentUid, stream, (s) => callback(null, s));
131131
}
132132
})
133133
}

0 commit comments

Comments
 (0)