Package muntjac :: Package ui :: Module html5_file :: Class Html5File
[hide private]
[frames] | no frames]

Class Html5File

source code

object --+
         |
        Html5File

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.

Instance Methods [hide private]
 
__init__(self, name, size, mimeType)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
getFileName(self) source code
 
getFileSize(self) source code
 
getType(self) source code
 
setStreamVariable(self, streamVariable)
Sets the StreamVariable that into which the file contents will be written.
source code
 
getStreamVariable(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, size, mimeType)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

setStreamVariable(self, streamVariable)

source code 

Sets the 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.

Parameters:
  • streamVariable - the callback that returns stream where the implementation writes the file contents as it arrives.