Can we get md5sum of a file from its info without downloading it?
See original GitHub issueFor example gdrive has a feature to obtain the md5sum of a single file such as a tar.gz, which will help to verify its md5sum hash before downloading it.
$ gdrive info 1Qhn-_Zh5EY4NHcQASCvASUzioOd2jH42
Id: 1Qhn-_Zh5EY4NHcQASCvASUzioOd2jH42
Name: QmSSNXFKFF2H6oJ37g3ZUAg58TWWWZY3wY8nPzCPAAyybU.tar.gz
Path: QmSSNXFKFF2H6oJ37g3ZUAg58TWWWZY3wY8nPzCPAAyybU.tar.gz
Mime: application/gzip
Size: 159.0 B
Created: 2019-09-26 11:10:42
Modified: 2019-09-26 11:10:44
Md5sum: 5ca2c9bc2d1b2c0fd6c03bd038d6066a
Shared: True
Parents: 0AIbqFF7bUOe8Uk9PVA
ViewUrl: https://drive.google.com/file/d/1Qhn-_Zh5EY4NHcQASCvASUzioOd2jH42/view?usp=drivesdk
DownloadUrl: https://drive.google.com/uc?id=1Qhn-_Zh5EY4NHcQASCvASUzioOd2jH42&export=download
[Q] Does/can pyocclient provide similar approach?
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
How to Check an MD5 Checksum on desktop/laptop (PC/MAC)
Go to the folder that contains the file whose MD5 checksum you want to check and verify. Command: Type cd followed by the...
Read more >How to get md5sum for online video without download
It is impossible to do it on the fly, because md5sum is calculated by reading the file from the beginning till the end...
Read more >Calculate the checksum for a file before it has been ...
I believe this is easily possible once the external file is stored locally (i.e. after it has been downloaded), but I would ideally...
Read more >How to check the MD5 checksum of a downloaded file
WINDOWS: · Open a terminal window. · Type the following command: md5sum [type file name with extension here] [path of the file] --...
Read more >How to do a remote 'md5sum' on a remote file without ...
To do a remote md5sum, you need to run md5sum on the web server. If you don't have login access to the web...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Basically, you should be able to retrieve the checksums using something like this:
Why is it
None? Does the server not have any checksums for my file? Yes it does, you can check by running the request manually:The problem here is that the
<oc:checksums>element contains an embedded<oc:checksum>element (singular). But sinceClient._parse_dav_elementonly checks for text nodes that are direct children of the returned property, it doesn’t find the checksums in the returned XML.@PVince81, this could be fixed by implementing special handling for
oc:checksums(because other properties likeoc:fileidoroc:owner-iddon’t have that additional wrapper), or by beefing up_parse_dav_elementto find text nodes recursively. I don’t have time for a PR right now though, sorry.@PVince81 is the PR merge into latest version of
pyocclient? When I fetch file info I am not able to see its md5sumI get following output:
File(path=/5760616759ab148e9633f0dfe2095040/5760616759ab148e9633f0dfe2095040.tar.gz,file_type=file,attributes={'{DAV:}getlastmodified': 'Wed, 01 Dec 2021 19:22:50 GMT', '{DAV:}getcontentlength': '156105780', '{DAV:}resourcetype': None, '{DAV:}getetag': '"dca03dee180caa17dfdc62f82ab5ece7"', '{DAV:}getcontenttype': 'application/x-gzip'})Is there any other function that I should use to fetch the
md5sum? Should I callfile_info()with a property flag?