Search code examples
angularfilehttpprotocols

Where is a file stored when I chose a file to upload, after chosen and before uploading?


I am writing a web app in C# + Angular + SQL. For the frontend, I need to write a button to import excel file to the database. When I click the button, it opens a dialog. When I click the "Choose File" button in the dialog, a window opens to choose a file on disk. At this point, I haven't clicked "Save" yet which means that the file is not yet sent to the server.

I would like to ask, where is the file stored at this point in time?


Solution

  • It's still on your disk. The browser internally just keep track of the exact path the file is. By the time you hit 'save', it will start reading it and send it to the server.