Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Some time we need to download the data from URL like PDF file, word file , CSV file etc. Most of server required the parameter in header so we need to provide the data through header after that he will provide the final url to download,
If the all required value passes correctly then it will automatically downloaded to your provided file path.
Here I have used Local file directory where we are storing all this files.
Steps:
1: We need to declare the request URL & File name:
like that: here i am downloading .pdf file
Note:
self.load() -> is function which make request .
Here we are downloading .pdf file but you can download any file by adding the extension of file.
2: Now we have to make HTTP request to server and download to local directory.
Note: tempUrl – is path of file directory where the actual data is there so we are fetching the data and write to file .
Now you can see the file also by fetching your file manager.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.