通过文件散列或文件元数据搜索Dropbox或Google Drive? [英] Search Dropbox or Google Drive by File Hash or File Metadata?

查看:177
本文介绍了通过文件散列或文件元数据搜索Dropbox或Google Drive?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种方法将照片存档与存储在Google云端硬盘或Dropbox中的存档同步。我需要做的一件事就是能够快速确定给定的照片是否已经上传到远程文件系统。

执行此操作的理想方法是使用文件散列进行搜索,但查看这些API时,我看不到一个简单的方法来执行此操作。 Dropbox确实允许您漫步用户的Dropbox并下载元数据(其中似乎包含MD5哈希)。



有没有更好的方法?

现在使用Dropbox API提供了可用于验证文件内容的文件数据散列。您可以在 FileMetadata.content_hash 中找到它。它不是单个MD5或SHA1,而是文件片段的SHA256散列组合。您可以在这里找到更多信息:



https://www.dropbox.com/developers/reference/content-hash



API不提供以此方式搜索的方法散列,但您可以使用它下载文件元数据,并在本地引用它。


I'm looking for a way to synchronize an archive of photos with an archive stored on Google Drive or Dropbox. One of the things that I need to do is to be able to rapidly determine if a given photo has already been uploaded to the remote file system.

The ideal way to do this would be to search by file hash, but looking at the APIs, I can't see an easy way to do that. Dropbox does allow you to walk the user's Dropbox and download metadata (which appears to include an MD5 hash).

Is there a better way?

解决方案

The Dropbox API now offers a hash of file data that you can use to verify a file's contents. You can find it in FileMetadata.content_hash. It isn't a single MD5 or SHA1, but rather a combination of SHA256 hashes of the pieces of the file. You can find more information here:

https://www.dropbox.com/developers/reference/content-hash

The API doesn't offer a way to search by this hash, but you can download the file metadata with it, and refer to it locally.

这篇关于通过文件散列或文件元数据搜索Dropbox或Google Drive?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆