Project Status

4 views
Skip to first unread message

wgrant

unread,
Jun 16, 2011, 5:10:17 PM6/16/11
to multiplefileuploader
I've decided to use this control in my current project but am curious
about the status of future development. My form gathers other fields
in addition to the file upload. What I do is append the unique id to
the file name in the temp location, submit the unique ids in the form
submission, and marry the form submission back up with the files after
the form submission.

I've run into some confusion on setting up the back end. You have a
checkbox to delete files but ALL this does is remove it from the
interface. I had to do the following to capture the deletion and set
up notification for my form submission:

dojo.connect(dijit.byId('field_upload_file').uploadUnitContainer,
'_notifyUploadUnitDeleted', function(unit) {
// hidden field that holds state of files:
var asUploadedFiles =
dojo.fromJson(dijit.byId('field_uploaded_files').value);
for(var i = 0; i < asUploadedFiles.files.length; i++){
if(asUploadedFiles.files[i].id == unit.getAssociatedID()){
asUploadedFiles.files[i].canceled = true;
}
}
var sUploadedFiles = dojo.toJson(asUploadedFiles);
dijit.byId('field_uploaded_files').setValue(sUploadedFiles);
});

This works but seems to be a little hacky since I'm connecting to a
'hidden' method. Do you have plans for creating an official listener
for deleting files? Also, if I'm completely off track here and
there's an easier, more mainstream way to do this, please let me
know.

Thanks for the great tool!

Sami Dalouche

unread,
Jun 17, 2011, 10:44:48 AM6/17/11
to multiplefileuploader
Hi,

You're right concerning the file deletion : there is no hook to
propagate the deletion to the backend. We definitely should add it
(added it to the TODO list). IMHO, we should actually rework all
notifications, add the ones that are missing, and also pass more
information to the callbacks so they can do something useful with the
notifications.

However, the solution is not as straightforward as just adding a
listener, since this ignores part of the story :
what happens if the user uploads a few files but never submits the
form ? To handle this case, you probably need some kind of timeout-
based cleanup mechanism.

Now, concerning the status of the project.. Not much development is
currently happening on the project these days. We might start hacking
MFU again at some point in the future, but you can consider the
project as being (temporarily) down for now. (Like lots of other small
open source systems, we lack time..)

If you feel like contributing, we would be pleased to help you with
the code & build.

regards,
Sami
Reply all
Reply to author
Forward
0 new messages