Discussion on: How to send POST request from fancybox window to page without reloading?

eruizdechavez profile image
Erick Ruiz de Chavez

Looks like what you are looking for is the FileReader API, more specifically, the readAsDataURL method which allows you to get the file contents in a secure way without having to send it back to the server. One you have the content you can do an XHR (AJAX) or Fetch request to send the content of the file without reloading the page.