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
Hacer clic en el enlace no me lleva al enlace href dentro de la etiqueta de anclaje

Creé un proyecto de pila MERN que toma enlaces de los libros y cuando haces clic en el nombre del libro, puedes descargar los libros. Pero mis enlaces href no me llevan al enlace correcto a pesar de que mi enlace dentro de la etiqueta es correcto cuando lo inspecciono en las herramientas de desarrollo. Mi aplicación funciona bien en localhost. Pero cuando lo implemento en Heroku, me enfrento a este problema. Aquí está mi opinión que me redirige a la dirección incorrecta.

 <a href="https://downloader.disk.yandex.ru/disk/80cbc9fad2fdcc069ca7b58e862b3181f46aeff20e9049ff9f3dbd93806051b1/6163214b/G5C0TX8CiPWFWwuAp3xzTufPyksiVML-SpOQbOukZFCoTLy-nqnTLWx0QHJJrpzusZJDu--tT6ghjzdgmnnIhg%3D%3D?uid=0&amp;filename=Ahmet%20Alpan%20-%20Dost%20Bombalar.epub&amp;disposition=attachment&amp;hash=I9yUHj%2BS67IaRxOANlGbhkKhx%2BMb83KCZa7A9q6PB7NuJBmsS3ntyZUZhtgmzgqmq/J6bpmRyOJonT3VoXnDag%3D%3D%3A/Meritokrasi/T%C3%BCrk%C3%A7e%20%5BePub%5D/Derecelendirilmi%C5%9F%20Kitaplar/Ahmet%20Alpan%20-%20Dost%20Bombalar.epub&amp;limit=0&amp;content_type=application%2Fx-bittorrent&amp;owner_uid=1327282368&amp;fsize=163051&amp;hid=15e448431fdbeff8567e22e9ecb6b8c6&amp;media_type=book&amp;tknv=v2">Ahmet Alpan - Dost Bombalar.epub</a>

No sé si Yandex o Google me restringen por motivos de seguridad. Aquí la aplicación que implementé en heroku. mi-aplicacion

Quiero compartir mi código que muestra cómo obtengo estos enlaces de descarga. También agregué encodeURI pero no funcionó.

 fetch(`/books/${search}`) .then((res) => res.json()) .then((d) => { Promise.all( d.map((e) => { return fetch( encodeURI( `https://cloud-api.yandex.net:443/v1/disk/public/resources/download?public_key=https://disk.yandex.ru/d/o9lNK0tpVCH7sQ&path=${e.path}` ) ) .then((res) => res.json()) .then((res) => { return { name: e.name, size: bytes2Size(e.size), date: new Date(e.date).toLocaleDateString(), file: res.href, }; }); }) ).then((data) => { setBooks(data); setIsLoaded(true); setisLoading(false); }); });

Cuando hago clic derecho en un libro después de la búsqueda, luego copio la dirección del enlace, está funcionando. Pero al hacer clic no funciona.

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!