-
Notifications
You must be signed in to change notification settings - Fork 19
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
PE-3699: uploads large files for public drives #1383
PE-3699: uploads large files for public drives #1383
Conversation
Implement the following packages: - ardrive_uploader - ardrive_utils - ardrive_crypto - arconnect - arfs
- use stable version of arweave - use stable version of the data bundler class - integrate the uploader with the ardrive app
Use the new API for tracking the progress of the uploads
move data bundle for its file
uses the new api on the upload streamed request.
- use new api for track progress - starts the implementation of the folder uploads. Currently, it's disabled.
- fixes the conflict resolution reusing the id
SecretKey? driveKey, | ||
required UploadType type, | ||
}) async { | ||
print('Creating a new upload controller using the upload type $type'); |
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.
use the debugPrint method instead
required UploadType type, | ||
}) async { | ||
print('Creating a new upload controller using the upload type $type'); | ||
|
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 may want to create the logger package
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.
Ideally packages would automagically take the logger instance from the app. Without that the params and exporting would not work as expected.
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.
Yes, but we can't import the app into the packages, we will end with a circular dependency. What we can do, is to create the logger and only instantiate it on the web app.
final Uri _turboUploadUri; | ||
|
||
@override | ||
Future<UploadController> upload({ |
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 are not sending the bdi for the upload
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.
?
); | ||
|
||
/// folders always are generated in the first BDI. | ||
final bundleForFolders = bundle.first; |
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.
Review it
Future<void> close(); | ||
void cancel(); | ||
void onCancel(); | ||
void onDone(Function(List<UploadTask> tasks) callback); |
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.
Renaming these methods
|
||
_onProgressChange!(event); | ||
|
||
if (_uploadProgress.progress == 1) { |
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.
Consider implementing a helper method instead of comparing the progress with 1
final webBundleSizeLimit = const MiB(65000).size; | ||
final mobileBundleSizeLimit = const MiB(65000).size; |
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's no bundle limit. We have a 64GiB limit for private files giving we reuse the same nonce.
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.
Thanks for the explanation, @karlprieb !
@@ -0,0 +1,84 @@ | |||
// import 'package:ardrive/services/arweave/graphql/graphql_api.graphql.dart'; |
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.
We don't use this file anymore.
Instead of removing this file, I'll add a TODO explaining that this class is coupled with the ArweaveService
and TransactionCommonMixin
classes.
When we remove this dependency, we can use this class in the future.
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.
(handle.uploadItem as TransactionUploadTask).data) | ||
.run(); | ||
|
||
progressStreamTask.match((l) => print(''), (progressStream) async { |
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 should handle left
here
final bundledDataItem = await (await createBundledDataItem).run(); | ||
|
||
return bundledDataItem.match((l) { | ||
// TODO: handle error |
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.
don't forget to handle error
final bundledDataItem = await (await createBundledDataItem).run(); | ||
|
||
return bundledDataItem.match((l) { | ||
// TODO: handle error |
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.
handle error
--- Releases ---
Android release: https://appdistribution.firebase.google.com/testerapps/1:305132849030:android:6cf0cd5ec064fad3ffce07/releases/6kfc9639sddqg