RapidContext
Access > Discovery > Insight
www.rapidcontext.com
Extends:
RapidContext.Widget
The file streamer widget class. This widget is used to
provide a file upload (file input) control that can stream the
selected file to the server. The file data is always sent
asynchronously (i.e. in the background) to allow the rest of
the web page to remain active also during the potentially long
delays caused by sending large amounts of data. The widget
creates its own <iframe> HTML element inside which the actual
<form> and <input> elements are created automatically.
Source code:
RapidContext_Widget_FileStreamer.js
Creates a new file streamer widget.
|
setAttrs(attrs)
Updates the widget or HTML DOM node attributes.
|
onselect()
Emitted when the file upload begins.
|
|
onupload()
Emitted when the file upload has completed.
|
JavaScript:
var file = RapidContext.Widget.FileStreamer({ url: "rapidcontext/upload/my_id" });
form.addAll(file);
MochiKit.Signal.connect(file, "onselect", function () {
file.hide();
// add code to show progress bar
});
file
30