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

199
Views
convertir cadena base64 a url base64 en node.js

Me preguntaba cómo convertir una cadena base64 en una URL base 64 que podría usar en el navegador para mi proyecto. Ya intenté usar base64.toString('base64url') , pero eso no funcionó. A continuación se muestra un código de ejemplo.

 const fs=require("fs") let base64image=fs.readFileSync("./image.png").toString("base64") let base64txt=fs.readFileSync("./text.txt").toString("base64") // converts base64 to a base 64 URL. function toBase64URL(filetype, base64){ /* ... */ } console.log(toBase64URL('png', base64image)) // => data:image/png;base64,iVBORw0KGgoAAAANSUhE... console.log(toBase64URL('txt', base64txt)) // => data:text/plain;base64,dmVyeSBkZXRhaWxlZCA6KQ==
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!