Say I have an HTML input with type file and an upload endpoint, now when I hit submit the file gets upload into the server. So there is any chance I can tap into the bytes (for e.g. 1mb at a time) before upload and modify them and send to upload. Just want a middle man function in the upload process. But the server sees it as a normal upload.
I get the file from accessing the input field (document.querySelector('input-id').files[0].file) and I can override the onsubmit event to modify the submit logic.
Is it even possible without modifying server logic, or I need a specific server-client logic to make modification of the data. Can you anyone tell me about the methods to do so?
Reading the file as a whole and modifying and uploading is not an option.
Thank You.