Skip to content

Instantly share code, notes, and snippets.

@syshack
Created March 29, 2013 03:47
Show Gist options
  • Select an option

  • Save syshack/5268644 to your computer and use it in GitHub Desktop.

Select an option

Save syshack/5268644 to your computer and use it in GitHub Desktop.
jbox_upload
public static void main(String[] args) throws UnsupportedEncodingException, ClientProtocolException, IOException {
JboxClientLoginService jboxClientLogin = new JboxClientLoginService("***", "***");
JboxMessage loginMsg = jboxClientLogin.login();
if(!loginMsg.isSuccessful()){return;};
JboxClientMainService jboxClientUploadFile = new JboxClientMainService(false);
String cookieValue = loginMsg.getIntegratedCookie();
JboxUploadOption option = new JboxUploadOption();
option.setFile(new File("D://10.txt"));
JboxMessage uploadMsg = jboxClientUploadFile.uploadFile(cookieValue, option);
System.out.println(uploadMsg);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment