com.vaadin.flow.component.upload.receivers.
Class MultiFileBuffer
All Implemented Interfaces:
Basic receiver implementation for receiving multiple file upload and storing
them as files. Files are stored by default to Files created using
File.createTempFile(String, String)
with a null suffix.
For a custom file the constructor AbstractFileBuffer(FileFactory)
should be used.
See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.
Creates a file buffer with a default file factory.
MultiFileBuffer
(FileFactory factory) Deprecated, for removal: This API element is subject to removal in a future version.
Creates a file buffer that uses a file factory to create custom upload
File
s. -
Method Summary
Modifier and TypeMethodDescriptiongetFileData
(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.
Get file data for upload with file name.
getFileDescriptor
(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.
Get the output stream for file.
getFiles()
Deprecated, for removal: This API element is subject to removal in a future version.
Get the files stored for this buffer.
getInputStream
(String fileName) Deprecated, for removal: This API element is subject to removal in a future version.
Get the input stream for file with fileName.
receiveUpload
(String fileName, String mimeType) Deprecated, for removal: This API element is subject to removal in a future version.
Invoked when a new upload arrives.
Methods inherited from class com.vaadin.flow.component.upload.receivers.AbstractFileBuffer
createFileOutputStream, getLogger
-
Constructor Details
-
MultiFileBuffer
public MultiFileBuffer()Deprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer with a default file factory.
Files will be created using
File.createTempFile(String, String)
and have that build 'upload_tmpfile_{FILENAME}_{currentTimeMillis}' -
MultiFileBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Creates a file buffer that uses a file factory to create custom upload
File
s.Parameters:
factory
- file factory for file buffer
-
-
Method Details
-
receiveUpload
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:
Receiver
Invoked when a new upload arrives.
Specified by:
receiveUpload
in interfaceReceiver
Parameters:
fileName
- the desired filename of the upload, usually as specified by the clientmimeType
- the MIME type of the uploaded fileReturns:
stream to which the uploaded file should be written
-
getFiles
Deprecated, for removal: This API element is subject to removal in a future version.Get the files stored for this buffer.
Returns:
files stored
-
getFileData
Deprecated, for removal: This API element is subject to removal in a future version.Get file data for upload with file name.
Parameters:
fileName
- file name to get upload data forReturns:
file data for filename or null if not found
-
getFileDescriptor
Deprecated, for removal: This API element is subject to removal in a future version.Get the output stream for file.
Parameters:
fileName
- name of file to get stream forReturns:
file output stream or null if not available
-
getInputStream
Deprecated, for removal: This API element is subject to removal in a future version.Get the input stream for file with fileName.
Parameters:
fileName
- name of file to get input stream forReturns:
input stream for file or empty stream if file not found
-
UploadHandler
instead