Where uploads are stored temporarily?

Hello Developer,
i am a newcomer at vaadin and have a question about uploads?

I build two variants to upload files. One Html5 Drag&Drop Box and a traditional upload field.
Currently i load all files in a buffer and show them at the screen.
But where is the file saved at this moment? It is in the browser cache? On my files system and i didn’t know it? Or handle vaadin this things by him self?
I want to save this files on my file system, if the user clicks save and not earlier.

I hope anybody can help me.

The files that are uploaded with the Vaadin Upload component are not stored anywhere by default; the content is provided to the listener class as a stream of bytes. Any operation after this must be implemented by the user (such as storing the file to the file system).

So, to achieve the functionality you want, you need to keep the content in memory until the user clicks the ‘save’ button; for instance a field in your view class. Then simply add a listener to your button that creates a File object, writes the content to it, and your done. Remember to close any streams and empty any temporary fields after you are done, to conserve memory on the server.

Thank you for your answer.
This means, my
application
holds the content in a buffer and not the browser or anything else.
For example:

public class UploadReceiver implements Receiver
{
	private ByteArrayOutputStream file = new ByteArrayOutputStream();
	
	@Override
	public OutputStream receiveUpload(String filename, String mimeType)
	{
		this.file.reset();
		return file;
	}
}

Exactly; the content is stored in-memory on the server (in the application).

If the content can be very big or you will have many concurrent users, it might make sense to store the data directly in a temporary file and then copy/move the file if the user clicks “Save”. You can use File.createTempFile(…) and File.deleteOnExit() - google for javadoc and examples.