Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [WebMethod]
- [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
- [PrincipalPermission(SecurityAction.Demand, Role = "Users")]
- public void UploadThumbnail(long jobId, string reference, string iconData) {
- byte[] b = Convert.FromBase64String(iconData);
- System.IO.FileStream fs = new System.IO.FileStream(Server.MapPath("/thumbnails/test.jpg"), System.IO.FileMode.CreateNew);
- System.IO.BinaryWriter w = new System.IO.BinaryWriter(fs);
- for(int i=0;i<b.Length;i++) {
- w.Write(b[i]);
- }
- w.Close();
- fs.Close();
- }
Add Comment
Please, Sign In to add comment