Questions tagged [download]

Transferring information from a distant network to a nearby computer, or taking the necessary steps to accomplish this data exchange. Avoid employing this label when inquiring about the location for obtaining external resources.

Get the excel file from the assets using vue.js

I need some help figuring out how to download an excel file from my vue.js project. I tried the following code: <template> <div class="row mt-5"> <a href="./assets/template.xlsx" target="_blank">Downloa ...

What is the best way to empty the input field after a download event is completed in Node.JS?

For hours on end, I've been struggling with a persistent issue in my video downloader app. After successfully downloading a video, the input field where the URL is entered remains filled instead of clearing out. The screenshot below illustrates the proble ...

Japanese Character File Naming Convention

When dealing with certain Japanese characters, the content disposition header appears as follows: Content-Disposition: attachment; filename=CSV_____1-___.csv; filename*=UTF-8''CSV%E3%82%A8%E3%83%93%E3%83%87%E3%83%B3%E3%82%B91-%E3%82%B3%E3%83%94%E3%83%BC.cs ...

Does the RequireJS order plugin begin fetching files in the correct order, but fail to wait for them to finish downloading?

I've been trying to incorporate RequireJS into my project, but I'm encountering some issues with its functionality. It seems like the order plugin should download scripts in the correct order and wait for each one to finish before moving on to th ...

Automate the process of creating and saving files directly to my computer's local disk with Selenium

My Report Generator is an intranet web application that creates around 100 PDF and Excel reports daily. It's crucial to ensure that all these reports are generated without any errors, but the manual checking process takes up to 200 minutes due to each repo ...

Guide to fetching and displaying a PDF file in the browser using Vue.js and Axios

Despite successfully using Axios to download a pdf file on the browser with correct page numbers and orientation, the content appears to be empty. Here is the API code snippet: [HttpGet] [Route("~/api/Document")] public HttpResponseMessage Get(in ...

Download files using AJAX in Laravel 5.6

I am faced with a challenge in my Laravel 5.6 REST API. Users have the capability to upload their files to a non-public folder. Now, I need to ensure that users can only download files if their JWT token is valid and they have the necessary privilege. H ...

Downloading a file after making a post request with Extjs 4 (including a code snippet for version 3.4)

I have come across similar questions, but none address the specific issue I am facing. My Ext.Ajax.request setup looks like this: var paramsStringVar = 'param1=1&param2=two&param3=something&param4=etc'; Ext.Ajax.request({ url: &ap ...

What is the best way to download npm packages for offline use?

I need to install gulp on my project, but my development machine does not have an internet connection. The issue is that on another machine where I do have internet access, I am unable to install any software like node or npm. Is there a way for me to do ...

Managing PHP's readfile() function for efficiently handling large file downloads

As I set up an online file management system, I encountered a roadblock. My attempt to send the file to the client using this customized readfile function seems to be causing issues: function readfile_chunked($filename,$retbytes=true) { $chunksize = 1 ...

How to prompt the browser to download a file with a specific name using node.js and express

I've created a node/express website as part of my university project. It allows users to search for a specific law ID, which then displays a table with various files in different formats and languages related to that ID. I am using the "http-proxy" module ...

Downloading PDF files with Angular

I am working with an angular function that retrieves pdf data from the server: printDocument: function (bundleId, policyId) { var fileName = "test.pdf"; var a = document.createElement("a"); document.body.appendChild(a); ...

Downloading Excel files in Angular using File Saver

Previously, I had set up a PHP post form that would download an excel file upon clicking the button. The form data was also posted to the URL successfully using plain HTML and submit form. This is the function in PHP that gets triggered when the form is p ...

Utilizing Angular to handle all your file uploading, storing, and downloading needs with base

I am currently working with Angular and attempting to upload a file to be stored in the database, and then download the file. I am utilizing base64 encoding/decoding for this process. It appears to be functioning correctly, however, when I try to open the ...

Customize the File Download Directory in Selenium Python Using Chromedriver

I need help with saving files to different locations in Python using Chromedriver. Below is the code I am currently using to set Chrome to download files to a specific folder_path without prompting for download location. After successfully downloading on ...

Acquire the xls data angular jax-rs document

I am using jax-ws on the server side, and angularjs on the client side. I am currently facing an issue with downloading an xls file sent from the server side. On the server side, I have the following code: @GET @Path("/exportemployeexls") ...

Learn how to allow users to download a folder and all of its contents, including subfolders, without compressing the files, directly in

Can you download a folder in its original state without compression through a browser? This means keeping the subfolders and files intact, rather than combining them into a single file. ...

Initiate a file download following the redirection of a user to a new page in NodeJS/Express

Overview I am currently developing a NodeJS project using Express. In the application, there are buttons visible to the public that trigger file downloads. These buttons are linked to protected routes which will redirect users to a login page if they are ...

Steps for downloading Excel or Zip files in Angular 4

Currently, my front end is built using Angular 4 and the back end is developed with Lumen 5.4. The task at hand requires me to export certain data as both an Excel and a zip file. I am utilizing the { saveAs } import from the package 'file-saver/Fil ...

Identify the user's default character encoding in order to provide the appropriate CSV file

Is there a way for the website to automatically serve CSV files encoded as windows-1252 to users on Windows workstations, and encoded as UTF-8 to other users? Currently, two URL links are used which requires the user to decide which one to click. Most use ...

What is the best way to download a file without interference from automated

I am currently working on automating tests for some websites using WebDriver, TestNG, and Java code. I have encountered a challenge with downloading files. Specifically, I am trying to download a file from the following link: http://www.labmultis.info ...

Storing an image in a file using PHP

After generating a graph using PHP and saving it as a PNG file with the given code, I have a query. How can I save the image for download instead of displaying it on a web page? Your assistance in guiding me through this process would be greatly apprecia ...

Using HtmlUnit for downloading files asynchronously

I'm attempting to download the XLS file from this specific location: (simply click on the "Export to XLS" link). However, when I execute this code snippet: page.getAnchorByText("Export to XLS").click().getWebResponse().getContentAsStream(); It ends up ...

Transfer a downloaded file from a secured pathway to the web browser

I have a setup with a react frontend and a nodejs/express backend. The backend has a protected route for serving files (downloads) like so: GET /api/file/:id When the frontend initiates a file download, it makes a request to this endpoint using the follo ...

Downloading files automatically from a webpage

Seeking a way to automatically download a file from a website, as the current manual process is cumbersome. Each time involves logging in, navigating to the file, and clicking download. If anyone has advice on automating this task using tools like MS DOS ...

Download a complete website using PHP or HTML and save it for offline access

Is there a way to create a website with a textbox and save button, where entering a link saves the entire website like the 'save page' feature in Google Chrome? Can this be done using PHP or HTML? And is it possible to zip the site before downloa ...

I am having trouble downloading JSON files on Chrome. Is there a workaround to bypass this issue?

It has come to our attention that Chrome has recently begun blocking the download of json files. This is causing issues with our internal content management system, as we rely on these files to move data between different environments. The problem extend ...

Modifying browser.location.href Cancels AJAX Requests

I am facing an issue with my HTML page. I have a button that, when clicked by the user, updates the window.location.href to the URL of a text file. In order to ensure that the file is downloaded and not opened in the browser, the text file is served with C ...

The click function in Selenium element is malfunctioning and not functioning properly

Greetings! I am currently utilizing Selenium in conjunction with Java to obtain a PDF from a specific website. Unlike other sites, this one does not generate PDFs beforehand but only after clicking on a designated link. Once the link is clicked, the web se ...

Issues with SSL Certification in Tensorflow using Python

I'm having trouble downloading the MNIST data using tensorflow.examples.tutorials.mnist.input_data.read_data_sets(). This function is supposed to send a request to the server to download approximately 1.5GB of data. However, I keep encountering an er ...

I encountered difficulties with utilizing res.send and res.download in Node/Express because the headers were already set

I have recently started working with Node and I am facing an issue where I need to render a webpage when accessing 'localhost:1337/download/open' along with downloading a file. I know that headers can only be set once, which is the error I keep e ...

Is there a way to efficiently download a large number of images (70,000) from URLs while adhering to restrictions on simultaneous downloads

I'm feeling a bit lost here. I have this csv file containing two columns: name and picture URL. My goal is to bulk download the 70k images from the file and save them in a folder, renaming each image with the corresponding name from the first column. In ca ...

Ways to Export HTML to Document without any borders or colorful text

How can I make a contentEditable area visible when filling text and then disappear when exporting the document? I found a script online that allows you to do this, but the issue is that the contentEditable area is not visible until clicked on. To address t ...

Extract all class elements from HTML code and save them to a text file using PHP

Is there a way to extract all span elements with the class "msgsource" from my website's HTML code and then save it as a .txt file for downloading? I tried using the following code, but it only downloads an empty text file: <?php // Grabbing conte ...

Using Ajax and PHP to Trigger a Forced Download

I am trying to develop a download script that enables the Force Download of JPGs. Below is my PHP script: <?php header("Pragma: public"); // required header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); ...

Is there a way to enable users to download files using node.js?

Currently, I am working on developing a website specifically for my school. One of the key features I want to include is the ability for students to easily download files (specifically, PDFs) using node.js. The concept is quite simple - students will be ...

Is there a JavaScript alternative to wget for downloading files from a specified url?

"wget http://www.example.com/file.doc" can be used to download the file to the local disk. Is there an equivalent way to achieve this in JavaScript? For example, let's look at the following HTML snippet. <html> <head> <script language=" ...

Changing the file download location in Webdriver when utilizing either the Chrome driver or Firefox driver

I'm currently facing an issue with saving an image in a specific folder using the "save as" option. I've figured out how to right click on the image and select the "save as" option, but I'm struggling when it comes to choosing the desired location in the o ...

Download a collection of base64 images as a ZIP file in Angular 4

I am currently developing an Angular2 v4 app using Typescript and I'm looking for a solution to download multiple images (in base64 format) as a Zip file. For instance, I have a sample array like this (containing fake base64 images just for illustrat ...

When trying to export a JSON file from an Angular app, the URL is prefixed with 'unsafe' and the download fails with a network error message

Looking for guidance on exporting a JSON file from an angular app. Below is the code snippet I am using: app.js file: app.config(['$compileProvider', function ($compileProvider) { $compileProvider.aHrefSanitizationWhitelist(/^\s*(htt ...

Is there a way for me to enable the user to easily download the HTML file?

Is there a way to create an Invoice in HTML rather than a PDF-file and provide the user with an easy download link for the HTML-file? When I simply link to the HTML file, it only seems to be "temporarily downloaded" and viewed in the user's web brows ...

Attempting to provide images that are dynamically downloaded in real-time using Express Middleware

I'm facing a challenge with express and middleware. My goal is to serve an image from disk, but if it's not there, download it from an external server and then display it. Subsequent requests for the same image should be served from disk. Downlo ...

What could be causing the issue preventing me from downloading a PDF file that is already stored on the server?

Below you will find the code snippet: define(ADMIN_ROOT,'/var/www/abc/pqr/web/control/'); $filename = $test_data['test_name']; $flname = ADMIN_ROOT.'modules/tests/test_pdfs/'.$filename; header("Content-Type: application/pdf") ...

Modify the name of the file for downloading and initiate the download either upon clicking or after a specified

Can anyone assist me in finding PHP code that can change a file name by adding the current date and then initiate a download of the file with a time delay? In case the download does not start, I would like to provide an option to download the file with the ...

Steps to click on the download icon while a PDF is displayed in a new tab through Selenium

Need help with automating the process of downloading a PDF opened in Chrome browser as a new tab WebElement root=DriverManager.getDriver().findElement(By.id("viewer")); WebElement shadowdom1=getShadowDOM(root,DriverManager.getDriver()); ...

html The "download" attribute causing a new tab to open rather than initiating a

I have a website built with Angular 4, where users can download images from an Amazon S3 bucket. However, I encountered an issue wherein instead of downloading the image, it opens in a new tab. I've tested this problem on different browsers such as Firefox ...

Link to download an Excel spreadsheet

My server is capable of generating excel files dynamically, and I am utilizing AJAX to download these dynamic excel files. Upon successful completion in the callback function, I receive the data for the excel file. $.ajax({ url: exporting. ...

How do I retrieve the download URL for the file created using Python in my Heroku App?

After developing my Flask App, I uploaded several files to the Heroku filesystem. I'm aware that these files are removed every time the dyno restarts. Now, in my HTML/JavaScript frontend, I'd like to provide users with a download button for thes ...

Wrapper API for a distinct Download API designed for Nodes

Currently, I am in the process of creating a wrapper API for another API that requires a filename as input to download a file. The original API link is I have attempted to create a wrapper for the above API, but it is not functioning properly. Instead of ...

Chrome won't display the downloaded file until at least 8 bytes have been sent, unlike Firefox which shows it immediately

My goal is to implement an HTTP method that sends a file to the user, but there is a delay of 4 seconds required to generate the file content. The challenge I'm facing is that Chrome only displays the file as being downloaded after 8 bytes are sent. U ...

Optimizing File Transfers and Streaming Using Next.js and CDN Integration

As I work on developing a download system for large files on my website using Next.js and hosting the files on a CDN, I face the challenge of downloading multiple files from the CDN, creating a zip archive, and sending it to the client. Currently, I have i ...

Provide users with the option to select a specific destination for saving their file

In the midst of my spring MVC project, I find myself in need of implementing a file path chooser for users. The goal is to allow users to select a specific location where they can save their files, such as C: estlocationsublocation... Despite reading n ...

How do browser preferences differ from desired capabilities?

Can you explain the distinction between setting 'preferences' and 'desired capabilities' in Selenium when configuring the browser? I've noticed references to "browser.helperApps.neverAsk.saveToDisk" as a preference, but how can we differentiate between th ...

Fetch a document from a NodeJS Server utilizing Express

Is there a way to download a file from my server to my machine by accessing a page on a nodeJS server? I am currently using ExpressJS and I have attempted the following: app.get('/download', function(req, res){ var file = fs.readFileSync(__dirname + ' ...

Guide to retrieving a file stored locally with VueJS

Currently, I am working on an upload system and I want to provide users with a sample template. The template is stored locally in a subfolder within the assets directory. My goal is to access this template in my VueJS component and display a link to it on ...

Downloading a PDF file through the use of Ajax and TCPDF can be a straightforward process

I have encountered an issue with my code. It works perfectly fine when I run the PHP script without using AJAX as a GET request. When executing, I am prompted to download the rendered PDF and everything functions correctly. However, due to the necessity of ...

Obtain or save the created QR code using VueJs and the vue-qrcode plugin

I am utilizing the "vue-qrcode" plugin to create a QR code for my users linking to their public profile, which they can then easily share on platforms such as business cards. My goal is to provide users with the option to download the QR code with one but ...

Is there a way to use JavaScript to add content to a document and then facilitate the download of that document?

Is there a way in JavaScript to write content to a JSON or TXT file and then download it, similar to how it is done in Python? const content = "Hello"; const link = document.createElement('a'); link.setAttribute('download', 'FileToWriteIn.txt'); link.href ...

The res.download method in a node.js express app does not display the correct filename upon downloading

Starting with what I have: core.app.get('/download/:key', function (req, res) { require("./../../module/fileupload.js").download(req.params.key, function(file, filename) { console.log(file + " - " + filename); if (file != null) res.dow ...

When attempting to save a base64 code to a directory, I encounter an issue where the image fails to load and cannot be accessed

I've been facing an issue where I try to save an image into a folder in my project, but the saved file appears corrupted and cannot be viewed or opened. Here's how I'm handling it: First, I receive the image through a form where I capture t ...

What is the reason for Chrome download freezing while serving a PDF from Google Cloud Storage through an Express App in Firebase?

I've developed an express application that serves PDF files from Google cloud storage to clients. When accessing the file endpoint, downloads sometimes stall in Chrome at around 1000KB to 1300KB. However, Firefox, Safari, and Postman usually have no i ...

What is the process for downloading a voice message using the WhatsApp API?

My current task involves creating an endpoint that interacts with the WhatsApp API by making a call using the Media URL format specified in their documentation. The goal is to retrieve the data in the same way it was received from WhatsApp, while also savi ...

PHP download feature enhancement using underscores

My goal is to retrieve and download a file based on the value passed in through POST. However, I'm encountering an issue where if the file name is "Functional requirements example," it gets downloaded as "__Functional." Am I making a mistake here? Th ...

Is it possible to identify the beginning of a download using Selenium?

Currently, I am using Python and Selenium to download a large batch of files. To ensure that each file is successfully downloaded, I am implementing a basic time.sleep() function, but I want to enhance efficiency and guarantee the completion of each downlo ...

Is it possible to download videos from a website using Java and Selenium?

For a personal project, I decided to develop a user-friendly program aimed at making it easier for students at my university to download online lectures. These videos are accessible on the internet, and in order to view them, users must first log in to th ...

Instructions for transferring files directly from one website to another

Looking at the PHP code snippet provided: <?php $image_cdn = "http://ddragon.leagueoflegends.com/cdn/4.2.6/img/champion/"; $championsJson = "http://ddragon.leagueoflegends.com/cdn/4.2.6/data/en_GB/champion.json"; $ch = curl_init();` $timeout = 0; cur ...

Using Vue to access and retrieve the file stored in a local folder

Just a few hours ago, I came across an issue where <a href='path' download></a> was not functioning properly in my Vue project right when I was about to wrap up. After spending almost 4 hours searching for a solution, I couldn't find anything, ...

Bypass the save as dialogue box and initiate automatic file download without interruption

Working on an Angular 1 web application, I am utilizing the HTML download Attribute. Using the code snippet below: <a href="/images/myw3schoolsimage.jpg" download>, I am enabling users to download presented data as an Excel spreadsheet. My goal i ...