Skip to content

Instantly share code, notes, and snippets.

View wgallios's full-sized avatar

William Gallios wgallios

View GitHub Profile
@metadaddy
metadaddy / b2_multipart.php
Last active September 18, 2024 18:44
PHP sample code for a multipart file upload to Backblaze B2. Usage: php php_multipart.php [-v] <bucket_name> <local_file>
<?php
// PHP sample code to show multipart file upload using the B2 Native API
// User supplies optional -v for verbose output from curl, then bucket name
// and path to local file
$rest_index = null;
$opts = getopt("v::", [], $rest_index);
$args = array_slice($argv, $rest_index);