如何禁用分段上传,以便同步匹配s3cmd中本地和远程文件的md5sum

时间:2021-05-17 14:06:52

How disable multipart upload so sync matches the md5sum of local and remote file in s3cmd. When I upload a large file, s3cmd separates the file into parts. The eTag on Amazon S3 is the last part of the multipart. How can I preserve the file uploaded with the md5sum of the local file.

如何禁用分段上传,以便同步匹配s3cmd中本地和远程文件的md5sum。当我上传大文件时,s3cmd将文件分成几部分。 Amazon S3上的eTag是multipart的最后一部分。如何保留使用本地文件的md5sum上载的文件。

1 个解决方案

#1


1  

You can manually calculate and send (save) md5sum of the whole object in the custom HTTP header. You can add any HTTP header when you send PUT request, and you will get the same header and value for the next GET or HEAD requests. We use this feature in our project RioFS, to save md5sum of the stored object and then compare the hash with the cached object to avoid re-downloading local files.

您可以在自定义HTTP标头中手动计算和发送(保存)整个对象的md5sum。您可以在发送PUT请求时添加任何HTTP标头,并且您将获得下一个GET或HEAD请求的相同标头和值。我们在项目RioFS中使用此功能,以保存存储对象的md5sum,然后将哈希值与缓存对象进行比较,以避免重新下载本地文件。

Hope this information helps you !

希望这些信息对您有所帮助

#1


1  

You can manually calculate and send (save) md5sum of the whole object in the custom HTTP header. You can add any HTTP header when you send PUT request, and you will get the same header and value for the next GET or HEAD requests. We use this feature in our project RioFS, to save md5sum of the stored object and then compare the hash with the cached object to avoid re-downloading local files.

您可以在自定义HTTP标头中手动计算和发送(保存)整个对象的md5sum。您可以在发送PUT请求时添加任何HTTP标头,并且您将获得下一个GET或HEAD请求的相同标头和值。我们在项目RioFS中使用此功能,以保存存储对象的md5sum,然后将哈希值与缓存对象进行比较,以避免重新下载本地文件。

Hope this information helps you !

希望这些信息对您有所帮助