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..