getUploadIdFromUrl static method

String getUploadIdFromUrl(
  1. String locationUrl
)

Implementation

static String getUploadIdFromUrl(String locationUrl) {
  final locationUri = Uri.parse(locationUrl);

  if (!locationUri.queryParameters.containsKey('upload_id'))
    throw Exception('The uplaod ID has not been found.');

  return locationUri.queryParameters['upload_id']!;
}