share method
Implementation
Future<String> share(String filePath,
{int expire = 7 * Duration.minutesPerDay,
List<int>? to,
String password = '',
int accessCount = -1}) async {
var req = ShareRequest(
filePath: filePath,
expire: expire,
to: to,
password: password,
accessCount: accessCount);
dio.Response<String> res =
await _client.post('/share', data: serializeRequest(req));
var resp = getResponse(res);
var shareResponse = ShareResponse()
..mergeFromProto3Json(jsonDecode(resp.data));
return shareResponse.link;
}