public void putFile(File file, String path) throws IOException {
        OAuthRequest request = new OAuthRequest(Verb.POST, FILES_URL + encode(path));
        Multipart.attachFile(file, request);
        service.signRequest(accessToken, request);

        checkFiles(request.send());
    }
public void putFile ( File file , String path ) throws IOException { OAuthRequest request = new OAuthRequest ( Verb . POST , FILES_URL + encode ( path ) ) ; Multipart . attachFile ( file , request ) ; service . signRequest ( accessToken , request ) ; checkFiles ( request . send ( ) ) ; }
Upload specified file to specified folder.

@param file to upload
@param path of target folder

@throws IOException iff exception while accessing file