rowy
rowy copied to clipboard
Derived Column: storage cannot upload stream/file
Describe the bug The storage instance of firebasestorage.Storage doesn't have any options to upload a file to firebase storage from a readable stream. Checking the @google-cloud/storage docs, it should be there - which version of firebase-admin/storage or @google-cloud/storage should I use as reference?
To Reproduce Steps to reproduce the behavior:
- Go to a derived column function code
- Write
storage.bucket().file(samplefile.txt).createWriteStream();in the derivative function. - See error
Expected behavior I'd expect storage to be able to upload a file from a stream.
Screenshots
const ts = Date.now();
const filePath = `users/${row.user.id}/uploads/${ts}-${i}.jpg`
const fileRef = storage.bucket().file(filePath);
const outputStream = fileRef.createWriteStream();
Rowy Run version If applicable, share the Rowy Run version from your project settings.
Desktop (please complete the following information):
- OS: macOS 15.0.1
- Browser Chrome
- Version 130.0.6723.71
Smartphone (please complete the following information): nA
Additional context Links to documentation/references:
- @google-cloud/storage how to streaming upload: https://cloud.google.com/storage/docs/streaming-uploads
- @google-cloud/storage File.createWriteStream ref: https://googleapis.dev/nodejs/storage/latest/File.html#createWriteStream
- Rowy storage interface: https://github.com/rowyio/rowy/blob/main/src/components/CodeEditor/firebaseStorage.d.ts#L429