public class Html5File extends Object implements Serializable
DragAndDropWrapper
can receive also files from client computer if
appropriate HTML 5 features are supported on client side. This class wraps
information about dragged file on server side.Constructor and Description |
---|
Html5File(String name,
long size,
String mimeType)
Constructs a new Html5 file wrapper.
|
Modifier and Type | Method and Description |
---|---|
String |
getFileName() |
long |
getFileSize() |
StreamVariable |
getStreamVariable() |
String |
getType() |
void |
setStreamVariable(StreamVariable streamVariable)
Sets the
StreamVariable that into which the file contents will be
written. |
public String getFileName()
public long getFileSize()
public String getType()
public void setStreamVariable(StreamVariable streamVariable)
StreamVariable
that into which the file contents will be
written. Usage of StreamVariable is similar to Upload
component.
If the StreamVariable
is not set in the DropHandler
the
file contents will not be sent to server.
Note! receiving file contents is experimental feature depending on HTML 5 API's. It is supported only by modern web browsers like Firefox 3.6 and above and recent webkit based browsers (Safari 5, Chrome 6) at this time.
streamVariable
- the callback that returns stream where the implementation
writes the file contents as it arrives.public StreamVariable getStreamVariable()
Copyright © 2018 Vaadin Ltd. All rights reserved.