eligrey / eligrey/FileSaver.js

Is it possible for SaveAs to work with multipart/form-data?

Open
#690 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
22k
Forks
4.3k
PR merge metrics
No merged PRs in 30d

Description

Hello!

I understand that FileSaver is best served for saving files generated on the Client side. However, I am having some trouble using FileSaver to save a blob that is generated on the server side. An example response from my server looks like so:

````
--fb16dfc4057377228b2a3b76a1e344b0
Content-Disposition: form-data; name="file"; filename="barsList.json"

[{"type":"header","version":"4.7.7","comment":"Export to JSON plugin for PHPMyAdmin"}...
````

Is there a way for SaveAs to download the data without the --fb16dfc4057377228b2a3b76a1e344b0 boundary first linee and the Content-Disposition: form-data; lines appended? Everything below those lines are the data I wish to download

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.