This file contains 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
// CloudStorage cs = new Box(context, "[clientIdentifier]", "[clientSecret]"); | |
// CloudStorage cs = new OneDrive(context, "[clientIdentifier]", "[clientSecret]"); | |
// CloudStorage cs = new GoogleDrive(context, "[clientIdentifier]", "[clientSecret]"); | |
//CloudStorage cs = new Dropbox(context, "[clientIdentifier]", "[clientSecret]"); | |
CloudStorage cs = new Egnyte(context, "[domain]", "[clientIdentifier]", "[clientSecret]“); | |
new Thread() { | |
@Override | |
public void run() { | |
cs.createFolder("/Shared/Documents/TestFolder"); // <--- | |
InputStream stream = null; |
This file contains 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
CloudStorage cs = new Egnyte(context, "[domain]", "[clientIdentifier]", "[clientSecret]“); | |
new Thread() { | |
@Override | |
public void run() { | |
cs.createFolder("/Shared/Documents/TestFolder"); // <--- | |
InputStream stream = null; | |
try { | |
AssetManager assetManager = getAssets(); | |
stream = assetManager.open("UserData.csv"); | |
long size = assetManager.openFd("UserData.csv").getLength(); |
This file contains 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
// id<CRCloudStorageProtocol> cs = [[CROneDrive alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
// id<CRCloudStorageProtocol> cs= [[CRGoogleDrive alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
// id<CRCloudStorageProtocol> cs = [[CRBox alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]" ]; | |
// id<CRCloudStorageProtocol> cs = [[CRDropbox alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
id<CRCloudStorageProtocol> cs = [[CREgnyte alloc] initWithDomain:@"[DOMAIN]" clientId:@"[CLIENT]" clientSecret:@"" redirectUri:@"[SECRET]" state:@"ANY"]; | |
NSString * path = [[NSBundle mainBundle] pathForResource:@"UserData" ofType:@"csv"]; | |
NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; | |
long fileSize = [fileAttributes fileSize]; |
This file contains 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
//let cloudStorage : CloudStorageProtocol = Box.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = GoogleDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = OneDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = Dropbox.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
let cloudStorage : CloudStorageProtocol = Egnyte.init(domain: "DOMAIN", clientId: "[CLIENT]", clientSecret: "[SECRET]", redirectUri: "[REDIRECTURI]", state: "ANY") | |
let path = Bundle.main.path(forResource: "UserData", ofType: "csv")! | |
let fileAttributes = try! FileManager.default.attributesOfItem(atPath: path) | |
let fileSize: UInt64 = fileAttributes[FileAttributeKey.size] as! UInt64 |
This file contains 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
CloudRail.setAppKey("[CloudRail License Key]"); | |
// CloudStorage cs = new Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
CloudStorage cs = new OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// CloudStorage cs = new GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
//CloudStorage cs = new Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
new Thread() { | |
@Override | |
public void run() { |
This file contains 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
const cloudrail = require("cloudrail-si"); | |
cloudrail.Settings.setKey("[CloudRail License Key]"); | |
// let cs = new cloudrail.services.Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
let cs = new cloudrail.services.OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
cs.createFolder("/TestFolder", (err) => { // <--- | |
if (err) throw err; |
This file contains 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
const cloudrail = require("cloudrail-si"); | |
cloudrail.Settings.setKey("[CloudRail License Key]"); | |
// let cs = new cloudrail.services.Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
let cs = new cloudrail.services.Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
cs.createFolder("/TestFolder", (err) => { // <--- | |
if (err) throw err; |
This file contains 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
//Profile profile = new GooglePlus(this, "[clientIdentifier]", "[clientSecret]"); | |
//Profile profile = new GitHub(this, "[clientIdentifier]", "[clientSecret]"); | |
//Profile profile = new Slack(this, "[clientIdentifier]", "[clientSecret]"); | |
//Profile profile = new Instagram(this, "[clientIdentifier]", "[clientSecret]"); | |
// ... | |
Profile p = new Facebook(this, "[clientID]", "[clientSecret]"); | |
p.login(); | |
String credentials = p.saveAsString(); | |
// Using OkHttp as an exmample for sending the HTTP request |
This file contains 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
const cloudrail = require("cloudrail-si"); | |
cloudrail.Settings.setKey("[CloudRail License Key]"); | |
// let cs = new cloudrail.services.Box(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.OneDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
let cs = new cloudrail.services.GoogleDrive(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
// let cs = new cloudrail.services.Dropbox(redirectReceiver, "[clientIdentifier]", "[clientSecret]", "[redirectUri]", "[state]"); | |
cs.createFolder("/TestFolder", (err) => { // <--- | |
if (err) throw err; |
This file contains 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
const cloudrail = require("cloudrail-si"); | |
cloudrail.Settings.setKey("[CloudRail License Key]"); | |
// let bcs = new cloudrail.services.AmazonS3(null, "[accessKeyId]", "[secretAccessKey]", "[region]"); | |
// let bcs = new cloudrail.services.MicrosoftAzure(null, "[accountName]", "[accessKey]"); | |
// let bcs = new cloudrail.services.Rackspace(null, "[userName]", "[apiKey]", "[region]"); | |
let bcs = new cloudrail.services.Backblaze(null, "[accountId]", "[appKey]"); | |
bcs.createBucket("myNewBucket", (err, bucket) => { | |
if (err) throw err; |
OlderNewer