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

377
Vistas
PHP CURL PUT de Amazon S3 stream wrapper (tcp stream)

Estoy intentando (PHP) cURL PONER un archivo de Amazon S3 a Vimeo usando el contenedor de flujo S3 (s3://...) y obtengo el siguiente error:

curl_setopt_array(): no puede representar un flujo de tipo tcp_socket/ssl como un ARCHIVO STDIO en [...]

¿Hay alguna manera de cURL PUT un archivo remoto? Estas son las opciones de curl que se envían:

 $curl_opts = array( CURLOPT_PUT => true, CURLOPT_INFILE => $file, // this refers to 's3://path-to-object' CURLOPT_INFILESIZE => $size, CURLOPT_UPLOAD => true, CURLOPT_HTTPHEADER => array('Expect: ', 'Content-Range: replaced...') );
about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Guarde el archivo en su servidor local antes de PONERLO:

 $file = tempnam(sys_get_temp_dir(), "foo"); $data = file_get_contents("s3://path-to-object"); $size = strlen($data); file_put_contents($file, $data); $curl_opts = array( CURLOPT_PUT => true, CURLOPT_INFILE => $file, // this refers to 's3://path-to-object' CURLOPT_INFILESIZE => $size, CURLOPT_UPLOAD => true, CURLOPT_HTTPHEADER => array('Expect: ', 'Content-Range: replaced...') );
about 4 years ago · Santiago Trujillo 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