Source Code Bundles
B2 Integration Checklist
Tools that integrate with B2 and want to be featured on the B2 integrations page need to follow these guidelines:
During an upload using the
Developers do not need to call
Detailed information and pseudo-code examples can be found in the Uploading section of the B2 API documentation.
If your tool is uploading many files, the best performance will be achieved by multithreading the upload and launching multiple threads simultaneously.
Downloads over 200MB should be split into parts and downloaded simultaneously. Once all parts are downloaded, the large file should be stitched together.
Handling error response status codes
See the Calling the API page section on Error Handling for a general description of error code classes. Some specific things to check in your integration are:
Managing metadata for interoperability
Setting consistent and appropriate metadata when uploading files will allow for different B2 clients, the B2 web user interface and the B2 Command Line Tool to interoperate correctly. Metadata is set as an HTTP request header when uploading files. Metadata in B2 is immutable.
Deleting file versions
B2 automatically creates versions of files uploaded to the same bucket, with the same name.
If your application allows a user to delete a file and there are multiple versions of that file, it's probably best to ask the user if they want to delete the last version or all versions.
Note: Language libraries and API wrappers for B2 should handle all of these conditions in the lower levels of the code, giving developers higher level constructs for their code.