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

263
Views
Reaccionar: Cómo abrir PDF en una nueva pestaña desde el almacenamiento en la nube sin descargar en la PC local

Estoy tratando de abrir pdf desde la nube en una nueva pestaña, sin descargarlo en la máquina local.

Intenté de esta manera pero no funcionó para mí. En la nueva pestaña, está dando un error. ingrese la descripción de la imagen aquí

 function readFileInNewTab (fileId) { let url = BASE_URL + "api/CMS/Documents/Download/" + fileId; const requestOptions = { method: 'GET', headers: { 'Content-Type': 'application/pdf', ...authHeader(url) }, credentials: 'include', responseType: "blob", // important }; inProgress = true; return fetch (url, requestOptions).then(handleResponse) .then((response)=> { const file = new Blob([response], { type: "application/pdf" }); //Build a URL from the file const fileURL = URL.createObjectURL(file); //Open the URL on new Window const pdfWindow = window.open(); pdfWindow.location.href = fileURL; }) .catch((error) => { console.log(error); }); }
about 4 years ago · Santiago Gelvez
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!