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

120
Views
Save a .txt file in local storage

Is there any way I can save a .txt file in the local storage and load it back in later? I have an file input element in html where I can load in files. The problem is, that when I reload the code I always need to reselect the file...

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can save only content but not files. If you have the possibility to read out the text file on the server and pack it into a json, then you can read out the json on the client side and pack it into your local storage.

If you do not have a server available, you can do this on the client side with: new XMLHttpRequest();. Read the file and save the content in your localstorage. In this sense: localStorage.setItem('MyContentFromTextFile', content)

about 4 years ago · Juan Pablo Isaza Report
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!