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

179
Views
Download File in Specified folder [Javascript]

I've been creating a small project with the aim of downloading youtube videos on my server. in theory it already works, but I want that, when I press download, it downloads the file in a specific folder inside the server.

this is my code for the function.

Used library: ytdl-core

app.get("/download", async(req, res) => {
    const info = await req.query.url;
    const v_id = info.split('v=')[1];
    res.header("Content-Disposition", `attachment; filename="${v_id}.mp3`);
    ytdl(info, {format: 'mp3'}).pipe(res);
});
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!