jjjake / internetarchive

A Python and Command-Line Interface to Archive.org
GNU Affero General Public License v3.0
1.61k stars 218 forks source link

Fix automatic size hint on uploads #626

Closed JustAnotherArchivist closed 8 months ago

JustAnotherArchivist commented 8 months ago

When uploading without a size hint (via headers or --size-hint), a x-archive-size-hint header is added automatically. However, prior to this commit, the value was the individual file size on each file's PUT request. This effectively made the size hint useless because it does not, in fact, provide a size hint for the total item size to the S3 backend at item creation time.

Notes on detailed changes to implement this:

jjjake commented 8 months ago

Looks great. Thanks again @JustAnotherArchivist.