thieumao

Demo upload file with Parse - Unity

Sep 14th, 2015
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using Parse;
  4.  
  5. using System.Collections.Generic;
  6. using System;
  7. using System.Threading.Tasks;
  8.  
  9. public class ParseTestScript : MonoBehaviour {
  10.  
  11.     // Use this for initialization
  12.     void Start () {
  13.         /*
  14.         ParseObject testObject = new ParseObject("TestObject");
  15.         testObject["foo"] = "bar";
  16.         testObject.SaveAsync();
  17.         */
  18.  
  19.         byte[] data = System.Text.Encoding.UTF8.GetBytes("Working at Parse is great!");
  20.         ParseFile file = new ParseFile("resume.txt", data);
  21.  
  22.         var jobApplication = new ParseObject("JobApplication");
  23.         jobApplication["applicantName"] = "Joe Smith";
  24.         jobApplication["applicantResumeFile"] = file;
  25.         jobApplication.SaveAsync();
  26.     }
  27.    
  28.     // Update is called once per frame
  29.     void Update () {
  30.    
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment