I have developed a script that intercepts Captcha form submissions. Typically, when the form is submitted, a file will be downloaded (such as exe or zip) in the usual way where it appears at the bottom of the Chrome browser and gets stored in the "downloads" directory.
However, I do not want the script to actually save the downloaded file on the user's computer. So, I modified the form submission process to handle the download using AJAX, and store the file data in a variable. Then, another function uploads this data to a PHP page.
Is there a way to retrieve information about the downloading file, such as its name and type? The file could be named 'Application.1.2.zip', but I am unsure how to get this data from the AJAX request that initiates the download. I only need this information to identify the file type and store it correctly on the second domain.
The current workflow involves downloading a file from Domain A (in any format) via AJAX, storing it temporarily, and then uploading it to Domain B using AJAX as well.
Thank you, Dan.