1
mirror of https://github.com/rclone/rclone synced 2024-12-28 21:03:45 +01:00
rclone/backend/b2
Nick Craig-Wood cb16f42075 b2: Make NewObject use less expensive API calls
Before this change when NewObject was called the b2 backend would list
the directory that the object was in in order to find it.

Unfortunately list calls are Class C transactions and cost more.

This patch switches to using HEAD requests instead. These are Class B
transactions. It is then necessary to parse the headers from response
back into the data that we get from the listing. However B2 returns
exactly the same data, just in a different form.

Rclone will use the old directory listing method when looking for
files with versions as these can't be found via a HEAD request.

This change will particularly benefit --files-from, rclone serve
restic but most operations will see some benefit.
2020-12-09 20:00:22 +00:00
..
api b2: Implement server side copy for files > 5GB - fixes #3991 2020-06-05 13:27:53 +01:00
b2_internal_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
b2_test.go build: fix up package paths after repo move 2019-07-28 18:47:38 +01:00
b2.go b2: Make NewObject use less expensive API calls 2020-12-09 20:00:22 +00:00
upload.go b2: cancel in progress multipart uploads and copies on rclone exit #4300 2020-06-25 15:22:53 +01:00