Hi Frederic,
Here some reasons why I created three classes for file upload:
1) The UploadForm widget is able to hold more then one files which then
can be uploaded in one step. You can have multiple UploadFile widgets
within UploadForm and one button which calls the UploadForm send method.
2) The UploadButton is an extra widget which puts the internal input
type=file tag out of screen and overlays it with a standard qooxdoo
button which then is themable including the icon of the button
3) The UploadFile is what we typically have: a textfield where the
filename is held and the "file select button". You can place more then
one UploadFile withtin a UploadForm.
4) The UploadForm has a parameter implementation where the parameters
are created as hidden input tags which belong to the form. The default
is to use POST for file submission.
5) The UploadForm widget holds an hidden iframe which is used for form
submission so no change of the current page is needed. The completed
event of the iframe is captured so the user can register an event
handler with the UploadForm to be able to handle the upload completion.
Additional methods allow to get results back from the iframe after
uploading.
My use of this implementation is a import window in the application
which allows importing of xml data into the db backend. The imported
file is validated. The validation results and errors are
sent back as a xml file which is then presented to the user.
frederic schrieb:
Hi Dietrich,
I use Nabble to read the mailinglist, could you please attach file in Nabble
: http://www.nabble.com/qooxdoo-f3821.html
I'm currently finishing up with the UploadFile class. I'll send files
tomorrow.
Your widget is very nice and was already integrated in my personal projects
using qx 0.6.x.
IMHO your code is a bit complex, 3 files to handle upload is not necessary.
See my explanations on top.
I have started yesterday to implement simple as possible an "input file"
code, I have planned to update the widget to be more integrate to qooxdoo.
It is perhaps early to merge our work but my goal is to have a standard
upload widget in the trunk.
What is your advice ?
Well I don't know how complex your implementation will become if you
have support for qooxdoo-ish download buttons, sending additional
parameters on submit and allowing multiple file uploads per form.
I decided to separate those implementations into three files. The main
complexity of the code comes from the iframe form submition, from the
additional parameter handling, the upload completion result handling and
the customizable file select button.
The implementation may look complex but the interface is simple.
My advice is to ask the list which features are needed in a file upload
widget. Wait until tommorow until I submit my files and have a look on
it. I don't mind if you change the code, use parts of the code or even
if your implementation does everything I need.
Maybe someone of the core wizards can give some comments.
cheers.
frederic
Regards
Dietrich
Dietrich Streifert wrote:
Hello List,
While having some time I ported my upload widget to 0.7beta3. It works
apart from some visual issues.
I also created a test perl cgi upload script which can be used to test
the implementation via a test html page.
I'd like to give the files to someone willing to test the implementation
and get some feedback.
I used the namespace qx.ui.io. for the classes which are:
UploadForm: a CanvasLayout which is capable of holding multiple file
fields. For submission a hidden iframe is used.
The result of the submission is available via method calls.
UploadButton: a file select button which opens the native browser file
selector and holds the selection result
UploadFile: a text field and a UploadButton where the text field holds
the value selected via the upload button.
The test file UploadFile_1.html demonstrates how the classes are used.
The upload is started on file selection.
I tried to add documentation to the classes but it's far away from being
complete.
Of course I would be able to add the implementation to trunk but I want
to get some more feedback from the comunity.
Sebastian Werner schrieb:
That's great. Maybe you can really polish it even more and continue your
work. The items on your enhancements list would be great if implemented.
Sebastian
frederic schrieb:
Hi list,
I have developed a small script to add "upload file" feature with
qooxdoo
0.7beta2
More information here :
http://frederic.fournaise.free.fr/qooxdoo-file-upload-widget.php
cheers.
frederic
Dietrich Streifert wrote:
Hi Nick,
Now with 0.7 beta two I hope the "dust has settled" regarding interface
changes in qooxdoo. I'll try to migrate the upload widget to 0.7 next
week as a first migration attempt.
I'll post the results here (positive or negative).
Nick Glencross schrieb:
Hi all!
Looking back in the forums the subject of an Upload widget as been
raised a few times. It would be really useful!
The feature is listed on the Requested Features page (I saw it
yesterday, but have mislaid the page link today), and an 0.6
implementation was posted recently by Dietrich Streifert in March.
Are their any plans to support such a widget? I tried migrating
Dietrich's to 0.7 but the tagName property is now deprecated and I
haven't managed to make it work.
Out of interest, would it be possible to just use a normal Form Upload
link embedded in a Qooxdoo application? Obviously not as nice as one
that uses an IFrame, but a good workaround.
Regards,
Nick
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
--
Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel