Addressing @stesch13's timeout concerns

I raised the arbitrary-ish revocation timeout from 10ms to 500ms. I hope
to refine this value in the future with input from YOU, my users reading
this.

Please comment on this commit with any feedback you have.

@stesch13's concerns can be found at
https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
This commit is contained in:
Eli Grey
2014-11-29 14:16:15 -05:00
parent 899ed116a9
commit 27c4818941
2 changed files with 6 additions and 5 deletions
+5 -4
View File
@@ -1,6 +1,6 @@
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 2014-08-29
* 2014-11-29
*
* By Eli Grey, http://eligrey.com
* License: X11/MIT
@@ -49,9 +49,10 @@ var saveAs = saveAs
}
, force_saveable_type = "application/octet-stream"
, fs_min_size = 0
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
// the reasoning behind the timeout and revocation flow
, arbitrary_revoke_timeout = 10
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
// for the reasoning behind the timeout and revocation flow
, arbitrary_revoke_timeout = 500 // in ms
, revoke = function(file) {
var revoker = function() {
if (typeof file === "string") { // file is an object URL