On one legacy project the following pattern was implemented.
Visualforce page has
div element with
ondrop event handler which processes
event.dataTransfer.files attribute to initiate
onloadend event handler and then method
readAsDataURL is called. Then
event.target.result is converted in
String and substring from next symbol after comma is used as file content.
The file is being loaded then into third-party domain using
$.ajax method of jQuery version 3.3.1 when security API Key and email credential is being sent in headers.
I guess I have seen somewhere such example as viable somewhere in the Salesforce documentation articles though but can't find right now.
However, the clients wonder about what is the maximum file size limit is on such approach.
So basically I have two questions.