Skip to content

Commit a53b71e

Browse files
committed
add fallback for old safari download and place it after save link block
1 parent 0f9220c commit a53b71e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/snapshot/filesaver.js

+7
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ function fileSaver(url, name, format) {
4949
return resolve(name);
5050
}
5151

52+
// Older versions of Safari did not allow downloading of blob urls
53+
if(Lib.isSafari()) {
54+
var prefix = format === 'svg' ? ',' : ';base64,';
55+
helpers.octetStream(prefix + encodeURIComponent(url));
56+
return resolve(name);
57+
}
58+
5259
reject(new Error('download error'));
5360
});
5461

0 commit comments

Comments
 (0)