uploadFileFromLocal method

Future<Map> uploadFileFromLocal({
  1. required File file,
  2. String? apiKey,
})

Upload local files using API / DOCS: https://doodstream.com/api-docs#files-copy

Implementation

Future<Map> uploadFileFromLocal({
  required File file,
  String? apiKey,
}) async {
  Map result = await invoke(
    uriPath: "upload/server",
    apiKey: apiKey,
    statusCodes: [200],
    specialTypeName: "uploadRemoteUrl",
  );
// {
//   "msg": "OK",
//   "server_time": "2017-08-11 04:30:07",
//   "status": 200,
//   "result": "https://xxx.dood.video/upload/01"
// }
//
// curl -X POST -F 'api_key={your_api_key}' -F 'file=@file.mp4' https://xxx.dood.video/upload/01?{your_api_key}

  return result;
}