Adds a default script to the page configurable by attributes passed to the widget.
Adds a default script to the page configurable by attributes passed to the widget. If you want customer behaviour, just make your own JS based on the avalible options:
Call UploadProgress.
Call UploadProgress.init from Boot.scala. This function sets up your application to use Lift's streaming upload rather than memory based upload. It also sets the maximum upload size to be 1GB... if you want a smaller number, just call the LiftRules.maxMimeSize and LiftRules.maxMimeFileSize after calling this objects init method in your Boot.scala.
import _root_.net.liftweb.widgets.uploadprogress.UploadProgress
UploadProgress.init
If you want your own custom URL for the progress callbacks, but dont want anything but the default response, just prepend your own DispatchPF in boot that looks something like:
If you want your own custom URL for the progress callbacks, but dont want anything but the default response, just prepend your own DispatchPF in boot that looks something like:
LiftRules.dispatch.append {
case Req("mycustomprogress" :: Nil, "", GetRequest) => () => UploadProgress.progressJsonResponse
}
In order to get progress updating on a session by session basis, we have to embed this function into the current users session and use a SessionVar extension in order to keep a track of where we are too with the upload.
A helper widget that makes it easy to do upload progress bars using ajax polling.