[ckan-dev] jquery.fileupload progress bar
Steven Matchett
gosefroba22 at gmail.com
Tue May 14 13:59:08 UTC 2013
I was curious if anyone had any experience with my problem. It seems that
someone responded to my question with a question about " Problem with debug
in PyDev " , which clearly wasn't very helpful
On Wed, May 8, 2013 at 9:47 AM, Steven Matchett <gosefroba22 at gmail.com>wrote:
> I am trying to implement a progress bar for resource uploads. After
> reading the docs for blueimp's jQuery-File-Upload it showed that you need
> to setup an event handler progress or progressall. I have done that as
> shown below, but the event is only being triggered after the upload has
> been completed.
>
> file - >
> .../src/ckan/ckan/public/base/javascript/modules/resource-upload-field.js
>
> setupFileUpload : function() {
> var options = this.options;
>
> this.upload.find('label').text(this.i18n('label'));
> this.upload.find('input[type=file]').fileupload({
> type : options.form.method,
> paramName : options.form.file,
> forceIframeTransport : true, // Required for XDomain request.
> replaceFileInput : true,
> autoUpload : false,
> add : this._onUploadAdd,
> send : this._onUploadSend,
> done : this._onUploadDone,
> fail : this._onUploadFail,
> always : this._onUploadComplete,
> progress : function(e, data) {
> var prgrsPerc = parseInt(data.loaded / data.total * 100, 10);
> console.log(prgrsPerc);
> },
> progressall : function(e, data) {
> var prgrsPerc = parseInt(data.loaded / data.total * 100, 10);
> console.log(prgrsPerc);
> }
> });
> },
>
--
Steven Matchett
Software Engineer -- MATRIC Research
West Virginia University - Lane Department of CS
Cell: (973) 945 - 8572
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20130514/deac62bb/attachment-0001.html>
More information about the ckan-dev
mailing list