Releases: incrediblezayed/file_saver
Releases · incrediblezayed/file_saver
v0.2.14
v0.2.13
v0.2.12
v0.2.11
v0.2.10
- Moved from
http
todio
for better control over the headers and other options - LinkDetails has more options such as
method
&body
here is the example of how to use the LinkDetailsLinkDetails( link: "www.example.com/file.extention", headers: /// Your headers here, method: /// Your method here (GET, POST, PUT, DELETE, PATCH), body: /// Request body here ),
- Both
saveFile
andsaveAs
methods now have thedioClient
&transformDioResponse
as a parameter, so you can pass your own dio client to the method and it will use that client to download the file & you can also pass thetransformDioResponse
to transform the response as per your requirement.\await FileSaver.instance.saveFile( name: "FileName", link: "www.example.com/file.extention", filePath: "pathOfFile", file: File(), bytes: bytes, ext: "extention", mimeType: MimeType.pdf, dioClient: Dio(), transformDioResponse: (response) { return response.data; });
- Fixed (GitHub issue #95)
- Fixed (GitHub issue #92)
v0.2.9
v0.2.8
- Moving saveAs() support for macOS to production.
v0.2.7
v0.2.6
v0.2.5
- Added apng mime type
- Added custom mimetype
So basically if you have a custom mimetype and it does not exists in the given enum, you can add your own mimeType using the field \
String? customMimeType,
and you will have to set the mimetype to custom and call the method like
await FileSaver.instance.saveFile(
name: "FileName",
link: "www.example.com/file.extention",
filePath: "pathOfFile",
file: File(),
bytes: bytes,
ext: "extention",
customMimeType: 'YourCustomType',
mimeType: MimeType.custom);
- Fixed repeated extension when using saveAs with MimeType.other on iOS (GitHub issue #65)