Esempio n. 1
0
 public static string GetFile(string fileName)
 {
     BoxApi.V2.BoxManager manager = new BoxApi.V2.BoxManager("tajqk0ic2qfb2ncv9wtdwmulkkll1zof", GetToken());
     var rootFolder = manager.GetFolder(Folder.Root, new[] { Field.Name, Field.Etag, Field.Size, Field.CreatedAt });
     var file = rootFolder.Files.Single(f => f.Name.Equals(fileName));
     return file.SharedLink.DownloadUrl;
 }
Esempio n. 2
0
 public static string CreateFile(string fileName, byte[] content)
 {
     BoxApi.V2.BoxManager manager = new BoxApi.V2.BoxManager("tajqk0ic2qfb2ncv9wtdwmulkkll1zof", GetToken());
     var rootFolder= manager.GetFolder(Folder.Root, new[]{Field.Name, Field.Etag, Field.Size, Field.CreatedAt });
     var file=manager.CreateFile(rootFolder, fileName, content);
     return file.SharedLink.DownloadUrl;
 }
Esempio n. 3
0
 public static BoxApi.V2.Model.Folder CreateFolder(string name)
 {
     BoxApi.V2.BoxManager manager = new BoxApi.V2.BoxManager("tajqk0ic2qfb2ncv9wtdwmulkkll1zof", GetToken());
     var rootFolder = manager.GetFolder(Folder.Root, new[] { Field.Name, Field.Etag, Field.Size, Field.CreatedAt });
     return manager.CreateFolder( rootFolder.Id, name);
 }