Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. [WebMethod]
  2.       [ScriptMethod(UseHttpGet = false, ResponseFormat = ResponseFormat.Json)]
  3.       [PrincipalPermission(SecurityAction.Demand, Role = "Users")]
  4.       public void UploadThumbnail(long jobId, string reference, string iconData) {
  5.  
  6.          byte[] b = Convert.FromBase64String(iconData);
  7.          
  8.          System.IO.FileStream fs = new System.IO.FileStream(Server.MapPath("/thumbnails/test.jpg"), System.IO.FileMode.CreateNew);
  9.          System.IO.BinaryWriter w = new System.IO.BinaryWriter(fs);
  10.          
  11.          for(int i=0;i<b.Length;i++) {
  12.             w.Write(b[i]);
  13.          }
  14.          w.Close();
  15.          fs.Close();
  16.       }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top