private static string GetFileContentUrl(BaseSpaceClient client, string fileId, out DateTime expiration)
{
// get the download URL
var response = client.GetFileContentUrl(new FileContentRedirectMetaRequest(fileId));
if (response.Response == null || response.Response.HrefContent == null)
{
throw new ApplicationException("Unable to get HrefContent");
}
if (!response.Response.SupportsRange)
{
throw new ApplicationException("This file does not support range queries");
}
expiration = response.Response.Expires;
return(response.Response.HrefContent);
}