Skip to content

Commit

Permalink
Enables correct transfer of UTF-8 filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
seseitz authored and jkuri committed Sep 5, 2018
1 parent 7ea7aba commit f16295a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ngx-uploader/src/lib/ngx-uploader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f16295a

Please sign in to comment.