public IActionResult SlackImagePost(int i) { var req = this.HttpContext.Request.Form; byte[] myFileContent; myFileContent = EbFile.Bytea_FromFile("F://1.jpg"); SlackPayload payload = new SlackPayload { Channel = req["Channel"], Text = req["Content"], SlackFile = new SlackFile { FileName = req["FileName"], FileByte = myFileContent, FileType = req["FileType"], } }; this.ServiceClient.Post(new SlackPostRequest { Payload = payload, PostType = 1 }); return(View()); }
public static EbConfiguration ReadTestConfiguration(string path) { return(EbSerializers.ProtoBuf_DeSerialize <EbConfiguration>(EbFile.Bytea_FromFile(path))); }