How does nativescript-background-http support unicode filename?


nativescript-background-http: 3.1.0

When upload a file with unicode name, let’s say Chinese, the filename that server gets is like ???.pdf.

  • the filename is correct just right before upload.
  • By using @angular/common/http with regular Angular Web App, the same scenario, it worked perfectly.

Is anyone facing the same issue here? Thanks.


My solution is:
Use the btoa() function to encode

Use the atob() function to decode.

I am not sure if this is the best way I need to go.

Looks like it doesn’t work since I cannot change the filename to base64 before uploading.

Any suggestion?


Final solution:
Since the file can be sent to server, we just need to rename the file with something like timestamp string, this also must be done to avoid duplicate file name.