Search Results

Search found 1 results on 1 pages for 'atu0830'.

Page 1/1 | 1 

  • How to save a stream on google drive?

    - by atu0830
    My application running on google app engine, so can not use File. I want to save a pdf file on other site to google drive, but get a IllegalArgumentException file.setMimeType("application/pdf"); mediaContent = new InputStreamContent(file.getMimeType(), url.openStream()); try { File result = getDrive().files().insert(file, mediaContent) .execute(); return result.getId(); } catch (Exception e) { e.printStackTrace(); } Thanks

    Read the article

1