Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

89
Views
Para cargar la imagen en el depósito s3 desde el front-end

Estoy usando react.js para el front-end, estoy tratando de cargar la imagen directamente en aws, obteniendo la URL de mi servidor.

 const handleSubmit = async (e) => { e.preventDefault() // In this get we url from to uplode profile image to s3 bucket ,first get url from server and then use that url to uplode directly to aws const res = await fetch("/api/website/aws/get-s3-upload-url") ---url from server to uplode to aws const data_2 = await res.json() const profile_url = await data_2.uploadUrl console.log(`This is profile url ${profile_url}`) // Now use this url to uplode the image to aws let form_data = new FormData() form_data.append("profile_image", profile) const resp = await fetch(profile_url, { method: "PUT", headers: { "Content-type": "multipart/form-data", }, body: profile, }) const data_3 = await resp

La respuesta que recibo de aws después de subir es: ingrese la descripción de la imagen aquí

Lo que quiero es la clave del objeto que puedo guardar en mi servicio, y cuando sea necesario, puedo obtener la imagen. ¿Cómo puedo lograr esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!