Skip to content

Commit ce0cba5

Browse files
committed
Implement initFileFn and readFileFn hooks
1 parent c9a1587 commit ce0cba5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/flow.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@
9393
permanentErrors: [404, 415, 500, 501],
9494
successStatuses: [200, 201, 202],
9595
onDropStopPropagation: false,
96-
read: webAPIFileRead
96+
initFileFn: null,
97+
readFileFn: webAPIFileRead
9798
};
9899

99100
/**
@@ -915,6 +916,8 @@
915916
* @function
916917
*/
917918
bootstrap: function () {
919+
evalOpts(this.flowObj.opts.initFileFn, this.fileObj, this);
920+
918921
this.abort(true);
919922
this.error = false;
920923
// Rebuild stack of chunks from file
@@ -1306,7 +1309,7 @@
13061309
*/
13071310
send: function () {
13081311
var preprocess = this.flowObj.opts.preprocess;
1309-
var read = this.flowObj.opts.read;
1312+
var read = this.flowObj.opts.readFileFn;
13101313
if (typeof preprocess === 'function') {
13111314
switch (this.preprocessState) {
13121315
case 0:

0 commit comments

Comments
 (0)