aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--browser/docx/files.js14
-rw-r--r--package.json3
2 files changed, 16 insertions, 1 deletions
diff --git a/browser/docx/files.js b/browser/docx/files.js
new file mode 100644
index 0000000..96736fa
--- /dev/null
+++ b/browser/docx/files.js
@@ -0,0 +1,14 @@
+var promises = require("../../lib/promises");
+
+exports.Files = Files;
+
+
+function Files() {
+ function read(uri) {
+ return promises.reject(new Error("could not open external image: '" + uri + "'\ncannot open linked files from a web browser"));
+ }
+
+ return {
+ read: read
+ };
+}
diff --git a/package.json b/package.json
index d3b6c4c..0a49b5a 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,8 @@
"jshint": "^2.5.2"
},
"browser": {
- "./lib/unzip.js": "./browser/unzip.js"
+ "./lib/unzip.js": "./browser/unzip.js",
+ "./lib/docx/files.js": "./browser/docx/files.js"
},
"bin": {
"mammoth": "bin/mammoth"