Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to verify downloaded file? #34

Open
ghiboz opened this issue Aug 22, 2016 · 6 comments
Open

how to verify downloaded file? #34

ghiboz opened this issue Aug 22, 2016 · 6 comments

Comments

@ghiboz
Copy link

ghiboz commented Aug 22, 2016

hello again,
here is my code that I use to download a file:

using (var response = await client.Files.DownloadAsync(file.AsFile.PathDisplay))
{
    File.WriteAllBytes(folder + "/" + realName, await response.GetContentAsByteArrayAsync());
}

but my question is: how can I check if the downloaded file is correct? is there a checksum or md5 or someother thing?

thanks in advance

@greg-db
Copy link
Contributor

greg-db commented Aug 25, 2016

The Dropbox API doesn't currently offer any sort of hash or checksum, but I'll be sure to pass this along as a feature request. If the download is interrupted though, an exception will be thrown.

@ghiboz
Copy link
Author

ghiboz commented Aug 26, 2016

👍 thanks @greg-db

@andrewst
Copy link

andrewst commented Mar 7, 2017

Hi,
What news this issues?
Thx.

@cakoose
Copy link

cakoose commented Mar 7, 2017

Recently, the API "FileMetadata" objects got a new "content_hash" field.

@andrewst
Copy link

andrewst commented Mar 7, 2017

thx @cakoose it's very good.
May be add DropboxContentHasher in sdk?

@greg-db
Copy link
Contributor

greg-db commented Mar 7, 2017

Thanks Andrew! I can't make any promises, but we'll keep this open as a request to integrate that directly into the SDK.

@dropbox dropbox deleted a comment from ehinolakingsley Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants