Open JustinTrvz opened 9 months ago
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Did anyone find a solution to this?
Any updates on this? I'm running into something similar Update: Fortunately I was able to bring my file sizes under the limit by compressing them, but I'd still be interested hearing solutions for cases with larger files
Greetings figured it out it set by an internal variable
what you have to do
blob = self.bucket.blob(blob_name)
///
blob.chunk_size =int(Mib(256*8).bytes) (increase the size)
///
blob.upload_from_string(file_string, content_type=content_type)
on digging in firebase admin emulator does not do resumable uploads mabye there is a variable somehwere to enable uploads but your best bet is to make a dev enviromnent and never use the emulator :(
I redacted the payload the response from the emulator should have been 308
Step 2: Describe your environment
Step 3: Describe the problem
I am using the
Firebase Emulator Suite - Storage
andfirebase-admin
in Python.I wand to upload files to the
Firebase Emulator Suite - Storage
and I already set the system's environment variableSTORAGE_EMULATOR_HOST
tohttp://localhost:9199
.When I use the function
blob.upload_from_filename(filename=file_path)
and I upload a file that is smaller than the_DEFAULT_CHUNKSIZE
(100 MB), which is defined inblob.py
, everything is fine. But if my file exceeds the chunksize (> 100 MB), the file will not be uploaded correctly.I tried to upload a 200 MB large file via the Firebase Emulator Suite UI in my browser (
http://127.0.0.1:4000/storage/<project-id>
) and it worked. So the problem is not the emulator itsself.These are the files I want to upload, which are larger than 700 MB per file.
This is the UI after uploading two of the files. The maximum file size I can reach is 104.86 MB...
The
Firebase Emulator Suite
does not throw any error, neither my code does.Relevant Code:
In the following code I am creating the Firebase app object in the
__init__
function and use the storage bucket to upload files using the functionupload_from_filename()
in my custom functionupload_zip_from_path()
:On the other hand I tried to chunk the file by myself, but this did not went well. With the following code the current chunk will overwrite the last chunk - this is not wanted... I wanted to append it to the file.