Created
September 26, 2016 13:21
-
-
Save supreettare/62250b07d35e0aef9c553691553f188f to your computer and use it in GitHub Desktop.
ReportStorageController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ReportStorageController : StorageController<Report> | |
| { | |
| [HttpPost] | |
| [Route("tables/Report/{id}/StorageToken")] | |
| public async Task<HttpResponseMessage> PostStorageTokenRequest(string id, StorageTokenRequest value) | |
| { | |
| StorageToken token = await GetStorageTokenAsync(id, value); | |
| return Request.CreateResponse(token); | |
| } | |
| // Get the files associated with this record | |
| [HttpGet] | |
| [Route("tables/Report/{id}/MobileServiceFiles")] | |
| public async Task<HttpResponseMessage> GetFiles(string id) | |
| { | |
| IEnumerable<MobileServiceFile> files = await GetRecordFilesAsync(id); | |
| return Request.CreateResponse(files); | |
| } | |
| [HttpDelete] | |
| [Route("tables/Report/{id}/MobileServiceFiles/{name}")] | |
| public Task Delete(string id, string name) | |
| { | |
| return base.DeleteFileAsync(id, name); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment