@formio/js 5.1.0-dev.6180.de668a0 → 5.1.0-dev.6181.dd734d1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/providers/storage/url.js +7 -3
- package/lib/mjs/providers/storage/url.js +7 -3
- package/package.json +1 -1
@@ -127,13 +127,17 @@ function url(formio) {
|
|
127
127
|
deleteFile(fileInfo, options) {
|
128
128
|
return new Promise((resolve, reject) => {
|
129
129
|
const xhr = new XMLHttpRequest();
|
130
|
-
xhr.open(
|
130
|
+
xhr.open("DELETE", fileInfo.url, true);
|
131
|
+
const token = formio.getToken();
|
132
|
+
if (token) {
|
133
|
+
xhr.setRequestHeader("x-jwt-token", token);
|
134
|
+
}
|
131
135
|
xhr.onload = () => {
|
132
136
|
if (xhr.status >= 200 && xhr.status < 300) {
|
133
|
-
resolve(
|
137
|
+
resolve("File deleted");
|
134
138
|
}
|
135
139
|
else {
|
136
|
-
reject(xhr.response ||
|
140
|
+
reject(xhr.response || "Unable to delete file");
|
137
141
|
}
|
138
142
|
};
|
139
143
|
if (options) {
|
@@ -125,13 +125,17 @@ function url(formio) {
|
|
125
125
|
deleteFile(fileInfo, options) {
|
126
126
|
return new Promise((resolve, reject) => {
|
127
127
|
const xhr = new XMLHttpRequest();
|
128
|
-
xhr.open(
|
128
|
+
xhr.open("DELETE", fileInfo.url, true);
|
129
|
+
const token = formio.getToken();
|
130
|
+
if (token) {
|
131
|
+
xhr.setRequestHeader("x-jwt-token", token);
|
132
|
+
}
|
129
133
|
xhr.onload = () => {
|
130
134
|
if (xhr.status >= 200 && xhr.status < 300) {
|
131
|
-
resolve(
|
135
|
+
resolve("File deleted");
|
132
136
|
}
|
133
137
|
else {
|
134
|
-
reject(xhr.response ||
|
138
|
+
reject(xhr.response || "Unable to delete file");
|
135
139
|
}
|
136
140
|
};
|
137
141
|
if (options) {
|