Add support for STORAGE_EMULATOR_HOST
I see lot of closed issues with emulators host support, but I am currently missing emulator for Storage.
Thanks a lot
plus1 for Storage emulator support
We have apiEndpoint in client which can be overridden. code pointer ref
Thanks @vishwarajanand, but how can I force HTTP instead of HTTPS (which Firebase emulator currently not support)?
cURL error 35: OpenSSL/3.0.8: error:0A00010B:SSL routines::wrong version number (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://firebase:9199/upload/storage/v1/b/snoofa/o?uploadType=multipart
$s = new StorageClient([
'apiEndpoint' => 'firebase:9199'
]);
$b = $s->bucket('test');
$b->upload('hello world', [
'name' => 'readme.txt',
]);
@universe-42 it seems you're trying to use Firebase storage emulator as described in this doc.
We don't have a fully functional storage emulator which has all Storage APIs implemented. We use Storage Testbench, ref code pointer which is a little closer and can work with http as well. I got it to work as:
docker run -it -p 9000:9000 gcr.io/cloud-devrel-public-resources/storage-testbench:v0.37.0
Hope this helps. Closing this case, since the question is already answered.