#upload of multiple files

97 views
Skip to first unread message

Milan Svoboda

unread,
May 30, 2012, 4:30:45 PM5/30/12
to nitro...@googlegroups.com
Hi,

Has anybody tried to modify #upload to support upload of multiple files?

Simple adding of {multiple, 'multiple'} to element_upload:render_element() doesn't work ;-)

Thanks,
Milan

Jesse Gumm

unread,
May 30, 2012, 4:33:46 PM5/30/12
to nitro...@googlegroups.com
Yup.

This is something I have *mostly* working and will be ready for the
2.1.0 release.

You can try it out using my repo: https://github.com/choptastic/nitrogen_core

It'll support drag and drop of files, multiple files, and little
progress bars next to the uploads - similar to the gmail interface.

There are still a few little bugs in there, but the uploading works just fine :)

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/ltzuiwAeqooJ.
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to
> nitrogenweb...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nitrogenweb?hl=en.



--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Milan Svoboda

unread,
May 30, 2012, 4:48:32 PM5/30/12
to nitro...@googlegroups.com
That's great! I'll try it.

Thank you.

Milan

Jesse Gumm

unread,
May 30, 2012, 5:21:42 PM5/30/12
to nitro...@googlegroups.com
Excellent.

The new attributes to look for are

#upload{
multiple=bool(),
droppable=bool()
}.

Droppable is currently unreliable. It was working for a while, then I
didn't touch it, now it's not. At least it's not working properly on
linux chrome.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/anEKY4S5NeIJ.

Milan Svoboda

unread,
May 31, 2012, 12:46:20 AM5/31/12
to nitro...@googlegroups.com
I have tried it and with some typo fixes it works! I sent a pull request to your github.

There is one bug I would like to fix: When you select more files there is no message about number of selected
files (or that anything was selected) in the input box.

When I added multiple property to the master at least the message was shown correctly.

Any idea?

Milan

Jesse Gumm

unread,
May 31, 2012, 12:51:05 AM5/31/12
to nitro...@googlegroups.com
Thanks for the fix, Milan!

I've merged your change.

Now to just finish up all the little things with the uploading
(getting drag and drop working again) - it's so silly that that's
still not just a simple built-in function of the browser, but at least
the the File API is a step in the right direction.

-Jesse
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/HaWhgBwHwlQJ.

Milan Svoboda

unread,
May 31, 2012, 4:43:48 AM5/31/12
to nitro...@googlegroups.com
With that change merged I enabled droppable and it shows selected files and progress bar; that's perfect :-)
And even drag and drop works! At least in chromium.

But it still shows a "No file chosen" in input[type=file] element. How to get rid of it?

Milan

Milan Svoboda

unread,
Jun 1, 2012, 3:05:07 PM6/1/12
to nitro...@googlegroups.com
I created a pull request that fixes that.

Milan

Jesse Gumm

unread,
Jun 1, 2012, 3:05:59 PM6/1/12
to nitro...@googlegroups.com
Great! I'll give it a looksee and merge it.
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/BOwj2-ZWsvAJ.

Jesse Gumm

unread,
Jun 11, 2012, 9:46:58 PM6/11/12
to nitro...@googlegroups.com
I've merged this into my current testing branch (along with a handful
of other rather significant pull requests), which is being loaded with
documentation and all the latest and greatest changes that, once I
feel good about the state of documentation and demos, will be merged
into the mainline branch for the official release.

You can see it in progress:
https://github.com/choptastic/nitrogen_core/tree/test-major-pull-requests

Thanks bud!

-Jesse

Milan Svoboda

unread,
Jun 19, 2012, 2:59:30 AM6/19/12
to nitro...@googlegroups.com
You are welcome!

Are you going to replace inplace_textarea, inplace_textbox with inplace?

Milan


On Tuesday, June 12, 2012 3:46:58 AM UTC+2, Jesse Gumm wrote:
I've merged this into my current testing branch (along with a handful
of other rather significant pull requests), which is being loaded with
documentation and all the latest and greatest changes that, once I
feel good about the state of documentation and demos, will be merged
into the mainline branch for the official release.

You can see it in progress:
https://github.com/choptastic/nitrogen_core/tree/test-major-pull-requests

Thanks bud!

-Jesse

Jesse Gumm

unread,
Jun 19, 2012, 6:16:34 PM6/19/12
to nitro...@googlegroups.com
Eventually I will replace the inplace_* events with the
implementations using inplace, however, I won't worry about it just
yet for the 2.1.0 release. A later smaller release will be refactored
to use inplace.

That said, would you be willing to do me a huge favor and write up a
documentation page for inplace?

Feel free to just copy one of the simpler documentation pages like
doc/elements/panel.org

No need to make the docs afterward, I'll make sure to give it a
once-over, but it would save me some time in documentation writing, as
I've been doing a ton of documentation writing for last minute changes
and am trying to get through as much as possible as quickly as
possible. Adding some of your own documentation would be wonderous.

-Jesse
>> >> nitrogenweb...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/nitrogenweb?hl=en.
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/AaP7p63nZRwJ.
>
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to
> nitrogenweb...@googlegroups.com.

Milan Svoboda

unread,
Jun 20, 2012, 3:57:39 AM6/20/12
to nitro...@googlegroups.com
Ok, I'll write the documentation page. I'll let you know when done.

Milan

On Wednesday, June 20, 2012 12:16:34 AM UTC+2, Jesse Gumm wrote:
Eventually I will replace the inplace_* events with the
implementations using inplace, however, I won't worry about it just
yet for the 2.1.0 release.  A later smaller release will be refactored
to use inplace.

That said, would you be willing to do me a huge favor and write up a
documentation page for inplace?

Feel free to just copy one of the simpler documentation pages like
doc/elements/panel.org

No need to make the docs afterward, I'll make sure to give it a
once-over, but it would save me some time in documentation writing, as
I've been doing a ton of documentation writing for last minute changes
and am trying to get through as much as possible as quickly as
possible.  Adding some of your own documentation would be wonderous.

-Jesse

On Tue, Jun 19, 2012 at 1:59 AM, Milan Svoboda
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/nitrogenweb?hl=en.
>> >
>> >
>> >
>> > --
>> > Jesse Gumm
>> > Owner, Sigma Star Systems
>> > 414.940.4866 || sigma-star.com || @jessegumm
>>
>>
>>
>> --
>> Jesse Gumm
>> Owner, Sigma Star Systems
>> 414.940.4866 || sigma-star.com || @jessegumm
>
> --
> You received this message because you are subscribed to the Google Groups
> "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/nitrogenweb/-/AaP7p63nZRwJ.
>
> To post to this group, send email to nitro...@googlegroups.com.
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages