-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.4.0 #16
v1.4.0 #16
Conversation
"This writable stream writer has been released and cannot be closed"
Used when FileSystemAPI is not available
MobileSelectableFolderFileSaver's FileSaver does not support streams
logic to prevent overwriting
reason: `extension` is dart reserved keyword (+ more explicit)
- add a method to save files on local app dir - ps: only mobile!
use static version
replace deprecated method
- Changes the implementation of the `listContent()` method to return the first level children of this folder. This behavior is already present on the `IOFolder` running on dart vm. - Implements a new interface `MutableIOFilePath` that allows the flexibility for change its own path. It is useful for generating the folder tree. `WebFile` now implements this interface. TODO: implement unit tests
renames mutable path variable
- implement recursive file tree generation for _WebFolder
Stream saving (+ misc fixes)
int progress = data[2]; | ||
|
||
/// only track the progress of current task id | ||
if (status == DownloadTaskStatus.enqueued) { | ||
controller.sink.add(0); | ||
} else if (status == DownloadTaskStatus.running) { | ||
debugPrint('Download progress: ' + progress.toString()); | ||
debugPrint('Download progress: $progress'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get rid of this log?
fixes download on safari and firefox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving with non-blocking comments/suggestions. We can address them in a further tech_debt ticket.
class SaveStatus { | ||
final int bytesSaved; | ||
final int totalBytes; | ||
final bool? saveResult; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the null value have a specific meaning here? Is it different than defaulting to false?
Edit - Having it be null means the download hasn't yet finished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can rename it to hasFinished
or isResultSaved
, or similar.
try { | ||
await _fileSaver.save(file); | ||
await _fileSaver.save(file, saveOnAppDirectory: saveOnAppDirectory); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can get rid of this try..catch because it's rethrowing and nothing else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment for the method below.
|
||
counter++; | ||
|
||
// TODO: Throw an exception on arbitrarily large counter? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump.
await writer.readyFuture; | ||
debugPrint('writer ready'); | ||
|
||
// FIXME: this never ends on Firefox/Safari. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to do here? - If not then let's remove the comment.
The merge-base changed after approval.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
Release Notes
Now it's possible to save files as Stream on Android, iOS, and Web.
On the Web, it uses
FileSystemAccess
when the browser supports it, otherwise, it will use theStreamSaver
.Limitations