Forum Discussion

Roman_argon's avatar
Roman_argon
Explorer | Level 4
7 years ago

Download failed when I use method save_url

Hi! I want to upload file to my dropbox with URL. I use swift and method:

client.files.saveUrl(path: pathDropbox, url: "https://www.google.com/imgres?imgurl=ht..... ").response....

I get response with 
asyncJobId, after it I call method: 

client.files.saveUrlCheckJobStatus(asyncJobId: jobId).response......
But always get response(not error): 

{

    ".tag" = failed;

    failed =     {

        ".tag" = "download_failed";

    };

}

I used different URLs but no one was successful. 

Best regards!

5 Replies

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

    It sounds like you're trying to save a file, presumably an image file, but based on the truncated URL you shared here, the URL you're using is actually to a Google Images HTML page, not to the image itself.

    Accordingly, the save operation is failing. If you're trying to save an image file, get and use the actual URL to the image itself.

  • Roman_argon's avatar
    Roman_argon
    Explorer | Level 4
    7 years ago

    Thank you for the quick help! It really was my mistake and now everything works.
    But I have another problem - I get "download failed" when I try to load a big file(about 200 Mb). Are there some limits on the size of a file that I want to load?

  • Roman_argon's avatar
    Roman_argon
    Explorer | Level 4
    7 years ago

    Unfortunately no. For example, when I use URL on file that has 72 Mb size I get next responses: 
    1) job_id%: YB64oiAB.....

    2) {

        ".tag" = "in_progress";

        }  (I get it 56 times)
    3) 

    {

        "client_modified" = "2019-05-14T07:03:24Z";

        "content_hash" = 4037d00b191afe414538970d5b165ddfa8696dd2c4209940fb4fdc064ae6dd4f;

        id = "id:BMvdcsqw6EAAAAAAAAABMg";

        name = "\U0420\U0430\U0437\U044a\U0435\U0437\U0434 18\U043a\U043c. \U041f\U0440\U0438\U043d\U0446\U0438\U043f\U0438\U0430\U043b\U044c\U043d\U044b\U0435 \U0441\U0445\U0435\U043c\U044b.pdf";

        "path_display" = "/\U0420\U0430\U0437\U044a\U0435\U0437\U0434 18\U043a\U043c. \U041f\U0440\U0438\U043d\U0446\U0438\U043f\U0438\U0430\U043b\U044c\U043d\U044b\U0435 \U0441\U0445\U0435\U043c\U044b.pdf";

        "path_lower" = "/\U0440\U0430\U0437\U044a\U0435\U0437\U0434 18\U043a\U043c. \U043f\U0440\U0438\U043d\U0446\U0438\U043f\U0438\U0430\U043b\U044c\U043d\U044b\U0435 \U0441\U0445\U0435\U043c\U044b.pdf";

        rev = 3443ae3b3d7;

        "server_modified" = "2019-05-14T07:03:34Z";

        size = 74214029;

    }


    All of this takes only 25 seconds.
    But when I use URL on file that has 139 Mb size I get next responses: 

    1) job_id%:YB64oiABCYAA.....
    2)

    2) {

        ".tag" = "in_progress";

        }  (I get it only 1 time)
    3) And immediately I get: 

    {

        ".tag" = failed;

        failed =     {

            ".tag" = "download_failed";

        };

    }

    All of this takes 3 seconds. I have the same problems with all files that have size more than 100 Mb

     

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

    I just tried this and successfully saved a 200 MB file, so it sounds like there may be something specific to the URLs you're using.

    Would you be able to share a sample URL that's failing like this so we can look into it? Feel free to open an API ticket if you'd prefer to share privately.

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!