diff --git a/projects/ngx-uploader/src/lib/ngx-uploader.class.ts b/projects/ngx-uploader/src/lib/ngx-uploader.class.ts index 9daa548d..78e79653 100644 --- a/projects/ngx-uploader/src/lib/ngx-uploader.class.ts +++ b/projects/ngx-uploader/src/lib/ngx-uploader.class.ts @@ -230,7 +230,7 @@ export class NgUploaderService { Object.keys(data).forEach(key => file.form.append(key, data[key])); Object.keys(headers).forEach(key => xhr.setRequestHeader(key, headers[key])); - file.form.append(event.fieldName || 'file', uploadFile, uploadFile.name); + file.form.append(event.fieldName || 'file', uploadFile, encodeURIComponent(uploadFile.name)); this.serviceEvents.emit({ type: 'start', file: file }); xhr.send(file.form);