public GetFileContentUrl ( Illumina.BaseSpace.SDK.ServiceModels.FileContentRedirectMetaRequest request, IRequestOptions options = null ) : FileContentRedirectMetaResponse | ||
request | Illumina.BaseSpace.SDK.ServiceModels.FileContentRedirectMetaRequest | |
options | IRequestOptions | |
return | FileContentRedirectMetaResponse |
public FileContentRedirectMetaResponse GetFileContentUrl(FileContentRedirectMetaRequest request, IRequestOptions options = null)
{
return WebClient.Send(request, options);
}
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); }