/// <summary> /// Marks a file as deleted. /// </summary> /// <param name="fileId"> Resource UUID </param> public void DeleteFile(Guid fileId) { var url = Urls.ApiFile(fileId); var request = (HttpWebRequest)WebRequest.Create(url); request.Method = "DELETE"; _requestHelper.ExecuteCommand(request, true); }
/// <summary> /// Requests file data. /// </summary> /// <param name="fileId"> Resource UUID </param> /// <returns> UploadcareFile resource </returns> public UploadcareFile GetFile(Guid fileId) { var url = Urls.ApiFile(fileId); var request = (HttpWebRequest)WebRequest.Create(url); request.Method = "GET"; var result = _requestHelper.ExecuteQuery(request, true, new FileData()); return(new UploadcareFile(this, result)); }