public HttpResponseMessage StaticPost(string id) { var filename = id; var newEtagPost = Database.Attachments.PutStatic(filename, GetEtag(), null, InnerHeaders.FilterHeadersAttachment()); var msg = GetMessageWithObject(newEtagPost); WriteETag(newEtagPost, msg); return(msg); }
public async Task <HttpResponseMessage> StaticPut(string filename) { var newEtag = Database.Attachments.PutStatic(filename, GetEtag(), await InnerRequest.Content.ReadAsStreamAsync(), InnerHeaders.FilterHeadersAttachment()); var msg = GetEmptyMessage(HttpStatusCode.Created); msg.Headers.Location = Database.Configuration.GetFullUrl("static/" + filename); WriteETag(newEtag, msg); return(msg); }