This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<add key="boxClientId" value="59oj4w7tft85e3t43v1dk4fbqub2e7bo" /> | |
<add key="boxClientSecret" value="MdSMRvyNNBkTAYZmFTgPXJuVfxf2af5s" /> | |
<add key="boxEnterpriseId" value="653871" /> | |
<add key="boxPrivateKeyPassword" value="BoxTraining1234" /> | |
<add key="boxPublicKeyId" value="eq2emlah" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Box.V2; | |
using Box.V2.Auth; | |
using Box.V2.Config; | |
using Box.V2.JWTAuth; | |
using Box.V2.Models; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.IO; | |
using System.Linq; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Web; | |
namespace BasicMvcSample.Helpers | |
{ | |
public static class CacheHelper | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Box Auth Header. Add your access token. | |
var headers = { Authorization: 'Bearer @ViewBag.AccessToken'}; | |
var uploadUrl = 'https://upload.box.com/api/2.0/files/content'; | |
var files = fileSelect.files; | |
var formData = new FormData(); | |
formData.append('files', files[0], files[0].name); | |
// Add the destination folder for the upload to the form |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<FileStreamResult> Thumbnail(string id) | |
{ | |
var thumbBytes = await BoxHelper.UserClient().FilesManager.GetThumbnailAsync(id, minHeight: 256, minWidth: 256, maxHeight: 256, maxWidth: 256); | |
return new FileStreamResult(thumbBytes, "image/png"); | |
} |
OlderNewer