Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
Pinata cloud Video extraction: The operation is insecure

I am trying to get thumbnails from a video inside a IPFS cloud (pinata.cloud) but I receive the error "The operation is insecure".

The link for the video: https://gateway.pinata.cloud/ipfs/QmWWeXfCNrgThTzAxbS7AZywnsgp2sdB9rbi5kxuUyUwpZ

So far I have this:

<video id="videoHolder" controls>
  <source src="https://gateway.pinata.cloud/ipfs/QmWWeXfCNrgThTzAxbS7AZywnsgp2sdB9rbi5kxuUyUwpZ" type="video/mp4" />
</video>

<canvas id="canvas-element"></canvas>

<a id="test-link"></a>

<script>
      function thumbnails() {
        var _VIDEO = document.querySelector("#videoHolder"),
            _CANVAS = document.querySelector("#canvas-element"),
            _CANVAS_CTX = _CANVAS.getContext("2d");

        _CANVAS_CTX.drawImage(_VIDEO, 0, 0, _VIDEO.videoWidth, _VIDEO.videoHeight);

        // Video metadata is loaded
        _VIDEO.addEventListener('loadedmetadata', function() {
            // Set canvas dimensions same as video dimensions
            _CANVAS.width = _VIDEO_PICTURE.videoWidth;
            _CANVAS.height = _VIDEO_PICTURE.videoHeight;
        });

        download()
    }

    var download = function(){
        var link = document.getElementById('test-link');
        link.download = 'filename.png';
        link.href = document.getElementById('canvas-element').toDataURL()
    }
</script>

I have also read somewhere that it is part due to the crossOrigin but since it is on a IPFS I cannot edit that (as far as I know).

So how can I still achieve my goal of getting a thumbnail out of this video on IFPS with JavaScript?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This isn't related to ipfs:// protocol since Pinata's cloud service is serving that content over https://.

Here's a question related to the operation is insecure error: canvas.toDataURL() Security Error The operation is insecure

And the top answer to this question explains why you can't bypass this security feature: Why can't I force download of tainted canvas and why is it a security issue?

Serving IPFS content using a reverse proxy as a trusted source instead would risk high bandwidth, so you may want to look down the route of using a server to extract a frame of the video hosted on Pinata's cloud.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda