Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] File uploads not working on modal window

File uploads not working on modal window 07 Sep 2014 16:09 #12614

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Hi,
File uploads are not working on the modal window.If I don't select the modal option on the same layout, it works fine.

Regards
Vivek
The administrator has disabled public write access.

File uploads not working on modal window 10 Sep 2014 13:44 #12621

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
When a modal are instancied, the saving process is done in ajax. Then, when the result is accepted, then it can close the window using javascript.

So the process changes a little bit.

Let me have a look...
Coding is now a piece of cake
The administrator has disabled public write access.

File uploads not working on modal window 25 Sep 2014 03:55 #12662

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
I see that the file upload is done through the post save hook and may be the enctype="multipart/form-data" is the issue here.

Regards
Vivek
The administrator has disabled public write access.

File uploads not working on modal window 25 Sep 2014 12:29 #12663

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
enctype="multipart/form-data" is defined.

this is not the problem.

The problem here is that the file uploads are complex in ajax. I've been searching, but the problem comes from javascript not handling properly.
I will have a look.
Some help here :

abandon.ie/notebook/simple-file-uploads-using-jquery-ajax

Or here:
tutorialzine.com/2013/05/mini-ajax-file-upload-form/
But this one is more complex, so I prefer to implement the simpliest one.

Also :
hayageek.com/ajax-file-upload-jquery/
code.tutsplus.com/tutorials/uploading-fi...with-ajax--net-21077

All those uploaders will not work with IE for the moment.
So anyway, you should think to build an alternative. the modal should not be the only way to upload files.

This is not a limitation of Cook, but cook has a problem I will try to fix because it seems to never works, even out of IE.
Coding is now a piece of cake
The administrator has disabled public write access.

File uploads not working on modal window 26 Sep 2014 11:11 #12664

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
Just to notice you that I am on a good way.
I am creating the ajax uploader for file. In fact, it is really trickky to achieve.

The form is first uploaded alone, and then a second ajax call take the images in charge.
This will not work on internet explorer (no workaround possible).

I am testing all this and it will be included soon.
Coding is now a piece of cake
The administrator has disabled public write access.

File uploads not working on modal window 26 Sep 2014 16:34 #12665

  • vivek
  • vivek's Avatar
  • Offline
  • Premium Member
  • Posts: 123
  • Thank you received: 2
  • Karma: 2
Thanks..Please let me know if I can be any help to you on these..

I have the experience of building html5 file uploader and html5 based multiple file uploaders in joomla.

Here is something which I had successfully implemented in the past.

www.developphp.com/view.php?tid=1351

Regards
Vivek
Last Edit: 26 Sep 2014 16:39 by vivek.
The administrator has disabled public write access.

File uploads not working on modal window 07 Oct 2014 21:28 #12674

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
This is now working.

There is no progressbar for the moment because ajax is only used like an invisible task.
I mean, when cook will support full ajax, then I will finish propoerly this part.

I have been working on the toolbar.js script and on the Hook frameworks wich now handles it all correctly for modal boxes.
You can notice also many few fixes around there.

EDIT : If you want to upgrade only the chages :
You need to upgrade JDom.
And add:
JDom::_('framework.hook’);
somewhere in your component. I have placed it in the helper::headerDeclarations();
Coding is now a piece of cake
Last Edit: 07 Oct 2014 21:30 by admin.
The administrator has disabled public write access.
Time to create page: 0.081 seconds

Get Started