We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e84bdc commit ac6307dCopy full SHA for ac6307d
file-uploader.html
@@ -135,7 +135,9 @@
135
136
this.$.progressOverlay.currentFile = file;
137
138
- (detail.xhrParamsPromise || Promise.resolve()).then(xhrParams => {
+ (detail.xhrParamsPromise || Promise.resolve({})).then(xhrParams => {
139
+ xhrParams.file = file;
140
+
141
return this._xhr(xhrParams).then(response => {
142
const data = {file, url: response.url};
143
@@ -198,6 +200,10 @@
198
200
return reject(new Error('file-uploader requires an URL'));
199
201
}
202
203
+ if (!file) {
204
+ return reject(new Error('file-uploader requires a file'));
205
+ }
206
207
const xhr = new XMLHttpRequest();
208
209
xhr.addEventListener('loadend', _ => {
0 commit comments