Need to see if your shared folder is taking up space on your dropbox đŸ‘šâ€đŸ’»? Find out how to check here.

Forum Discussion

tscheims's avatar
tscheims
New member | Level 2
8 years ago
Solved

Android V2 API. Successful fileupload but no file in Dropbox Directory

I'm using the example source code from github for an android application.

 

For the file upload  i'm using the provided UploadFileTaks class. I get no exception and the "onUploadComlete" Callback is called after 1-2 seconds, but i dont find the file in my dropbox folder.

 

What i'm missing / doing wrong?

 

Kind regards

tscheims

 

 

 

  • I found the error: I just looked in the wrong directory: the directory is located under /Apps/app-name

4 Replies

  • tscheims's avatar
    tscheims
    New member | Level 2
    8 years ago

    The FileMetadata return Value looks like this:

     

    {".tag":"file","name":"1520981755788.jpg","id":"id:**********","client_modified":"2018-03-13T22:57:09Z","server_modified":"2018-03-13T22:57:09Z","rev":"*************","size":2150,"path_lower":"/app-path/1520981755788.jpg","path_display":"/app-path/1520981755788.jpg","content_hash":"f27d13527113eedb61b03049bdfc2f**********************************"}

     

    and that's the used upload method:

     

    try (InputStream inputStream = new FileInputStream(localFile)) {
    return mDbxClient.files().uploadBuilder(remoteFolderPath + "/" + remoteFileName)
    .withMode(WriteMode.OVERWRITE)
    .uploadAndFinish(inputStream);
    } catch (DbxException | IOException e) {
    mException = e;
    }
  • tscheims's avatar
    tscheims
    New member | Level 2
    8 years ago

    I found the error: I just looked in the wrong directory: the directory is located under /Apps/app-name

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago

    max1450 

    O cartaz original aqui resolveu o problema, entĂŁo, se vocĂȘ tambĂ©m estiver executando em um problema, abra um novo tĂłpico com os detalhes no fĂłrum relevante para que possamos ajudar.
    ---

    Desculpe nossas traduçÔes. Nossas traduçÔes foram criadas usando um tradutor online. NĂłs gostarĂ­amos de suportar todos os idiomas, mas atualmente nĂŁo estamos equipados para fazĂȘ-lo. Aqui estĂĄ a versĂŁo em inglĂȘs:

    ---

    Please excuse our translations. Our translations were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:

    --- 

    The original poster here sorted out their issue, so if you're also running in to a problem, please open a new thread with the details in the relevant forum so we can help.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!