Skip to content

Tonku/upload_largest_files

 
 

Repository files navigation

upload_largest_files

This plugin is a wrapper for the project Upload largest Files to make uploads on the web. See the example for more details. See the example for more details. Before running the example you should start the upload server on the folder: example/lib/server.

Upload largest files - example

Getting Started

The use is very simple. The upload largest files receive an object to make an upload and then process in a native js.

Future<void> _uploadFile(File file) async {
  final props = UploadLargestFilesProps();
  props.file = file;
  props.url = '$serverHost/$uploadPath';
  props.onProgress = (ProgressEvent p) async {
    print('loaded: ' + p.loaded.toString());
    print('total: ' + p.total.toString());
  };
  await uploadLargestFiles.uploadFile(props);
}

About UploadLargestFilesProps:

Prop Type Description
file (required) File The upload file.
url (required) String The server URL to make an upload.
headers (optional) Object The request headers to make an upload.
httpMethod (optional) POST,GET,PUT,PATCH The method to make upload (POST is default).
onProgress (optional) Function(ProgressEvent progress) The callback function to make follow the upload progress..

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 83.3%
  • HTML 9.8%
  • Shell 4.7%
  • JavaScript 2.2%