Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
How to concatenate multiple images to send them to Firebase Storage as one file

I am working on a canvas to video converter. Frames are generated from an animated canvas with .toDataURL(), then sent to a Cloud Function to be converted into a video file with FFMPEG. Since the http requests have their limits, instead of sending them directly in a request body, I am first uploading frames to Firebase Storage, then downloading them in my Cloud Function. With FPS set to 25 and a 1 minute video duration I get 1.5K frames that need to be sent to Firebase Storage. Their free daily limit is 20K uploads which I can hit pretty fast if I have a longer video or multiple canvas conversions each day. My idea was to concatenated those Data URLs in a single text file, upload it to Firebase Storage, then split into individual files in my Cloud Function.

const frames = [];

for (let index = 0; index < maxFrames; index++) {
  ...
  frames.push(canvas.toDataURL('image/jpeg', .75));
}

const blob = new Blob([frames.join('\n')], { type: 'text/plain' });

Everything works like a charm with short videos, however longer videos get this Uncaught RangeError: Invalid string length error which basically means that the resulting string is too long. Any ideas or workarounds?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda