Edgewall Software
Modify

Opened 9 years ago

Last modified 9 months ago

#2141 new enhancement

Upload more then one attachment at a time

Reported by: anonymous Owned by: jonas
Priority: high Milestone: next-major-releases
Component: attachment Version: devel
Severity: normal Keywords: attachment jquery
Cc: pkou@…, mmitar@…, ivan@…, thijstriemstra, ethan.jucovy@…, olemis+trac@…
Release Notes:
API Changes:

Description

It would be nice to be able to upload and delete multiple attachments.

Attachments (7)

trac.multifile.patch (8.2 KB) - added by slavazanko@… 7 years ago.
Add multifile upload feature
miltiFileAttach.r6165.patch (7.1 KB) - added by Slava Zanko <slavaz> 7 years ago.
miltiFileAttach.r6253.patch (7.1 KB) - added by Slava Zanko <slavaz> 7 years ago.
renew patch
webmail.jpg (46.1 KB) - added by anonymous 7 years ago.
miltiFileAttach.r7578.patch (7.8 KB) - added by vnaum@… 6 years ago.
Slava Zanko's multifile attachment patch, updated to r7578
multiFileAttach.r9435.patch (7.5 KB) - added by o.shirochenkov@… 5 years ago.
This patch is broken
0001-Multi-file-Attachment-Facility.patch (8.9 KB) - added by support@… 4 years ago.
Working multiple-attachments based on r9099

Download all attachments as: .zip

Change History (41)

comment:1 Changed 9 years ago by anonymous

Perhaps the "Attachments" header could be a link to a page for managing the attachments? Not sure how to make this simple.

comment:2 Changed 9 years ago by anonymous

Perhaps in combination with #787, to edit the names of multiple attachments.

comment:3 Changed 8 years ago by mgood

#2406 has been marked as a duplicate.

comment:4 Changed 8 years ago by anonymous

  • Keywords pkou@ua.fm added

comment:5 Changed 8 years ago by cboos

  • Cc pkou@… added
  • Component changed from wiki to general
  • Keywords attachment jquery added; pkou@ua.fm removed
  • Milestone set to 2.0

That could probably be done with some bits of Javascripts → the base "Add Attachment" page would still propose one attachment to be added, the javascript enhanced one would have an "Add another attachment" button which will insert a new set of fields in the form.

comment:6 follow-up: Changed 8 years ago by anonymous

  • Priority changed from normal to highest
  • Version changed from 0.8.4 to 0.10-stable

Why can't it function like a multiple file select option - as in photoshop? (file>open>control+click on the files) - it allows you to select more than one file. I'm SURE this would be a benefit for all users.

comment:7 Changed 8 years ago by eblot

  • Priority changed from highest to normal

comment:8 in reply to: ↑ 6 Changed 8 years ago by mgood

Replying to anonymous:

Why can't it function like a multiple file select option - as in photoshop? (file>open>control+click on the files) - it allows you to select more than one file.

Because the HTML file input field does not support that.

comment:9 follow-up: Changed 7 years ago by anonymous

  • Component changed from general to ticket system

How about modifying it so that it will? (I don't have a clue how to, or I would have done it already!)

comment:10 in reply to: ↑ 9 Changed 7 years ago by mgood

Replying to anonymous:

How about modifying it so that it will? (I don't have a clue how to, or I would have done it already!)

I can't. Doing this would require changing the HTML spec and all the web browsers to support this. It's not something that can be done by Trac.

Changed 7 years ago by slavazanko@…

Add multifile upload feature

comment:11 Changed 7 years ago by anonymous

My patch not fully tested (not tested on: IE lesser than 5.0, Opera lesser than 8.5, Firefox lesser that 1.5). Enjoy.

comment:12 Changed 7 years ago by cboos

  • Milestone changed from 2.0 to 0.12

#6361 has an patch updated for trunk@6164, but newer version will be posted here, until this gets eventually integrated in 0.12.

Changed 7 years ago by Slava Zanko <slavaz>

comment:13 Changed 7 years ago by Slava Zanko <slavaz>

  • Version changed from 0.10-stable to devel

More correct patch (for r6165)

However please consider using jQuery for the Javascript parts

I do not know fully jQuery (today began to study:)). JQuery used according to their knowledge:)

and take care to not introduce spurious changes in the .py files.

fixed

comment:14 Changed 7 years ago by Slava Zanko <slavaz>

r6169: patch functional.

Perhaps it would be better to issue a new patch as soon as the latest revision(s) would make it inoperable (change files trac/attachment.py; trac/templates/attachment.html; trac/htdocs/js/trac.js)

Changed 7 years ago by Slava Zanko <slavaz>

renew patch

comment:15 Changed 7 years ago by Slava Zanko <slavaz>

See #2827 for new patches (multifile attachment patch included into thumbailPreview patch)

comment:16 Changed 7 years ago by osimons

#3176 closed as duplicate.

comment:17 Changed 7 years ago by cboos

#7090 was closed as duplicate.

Changed 7 years ago by anonymous

comment:18 Changed 6 years ago by Piotr Kuczynski <piotr.kuczynski@…>

  • Component changed from ticket system to attachment

Changed 6 years ago by vnaum@…

Slava Zanko's multifile attachment patch, updated to r7578

comment:19 Changed 6 years ago by kamil@…

Any chance of getting this feature added to the next release?

comment:20 Changed 5 years ago by mmitar@…

  • Cc mmitar@… added

Maybe this could be solved by additional option of unpacking compressed file and adding its content as attachments. So we could have an option "add file's content as attachments" or something similar and if an user checks this then Trac tries to unpack it and add all files. (It would probably require also another option for limiting max compressed file size uploaded in this manner and max number of files added.)

comment:21 Changed 5 years ago by bessarabov <ivan@…>

  • Cc ivan@… added

comment:22 Changed 5 years ago by Ryan Ollos <ryano@…>

  • Cc ryano@… added

Changed 5 years ago by o.shirochenkov@…

This patch is broken

comment:23 Changed 5 years ago by o.shirochenkov@…

Hi, All.

I've tried to fix attachment:miltiFileAttach.r7578.patch as r7578 for r9435.

I'm using this patches for the first time.

After fixing some tabs to spaces and solving some conflicts I got attachment:multiFileAttach.r9435.patch, but this is not working. I'm sure that I there is no mistake, I think, that there were some serious changes from r7578 to r9435, so the patch must be corrected.

Please, help me to fix this! I don't know python.

It would be great to see this feature from the box.

Error

AttributeError: Cannot find an implementation of the "IRequestHandler" interface named "WikiModule". Please update the option trac.default_handler in trac.ini.

While doing a GET operation on /, Trac issued an internal error.

User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB6 YB/4.3.0

System Information

Trac 0.12dev-r9435
Babel 1.0dev-r488
Docutils 0.5
Genshi 0.6dev-r1092
mod_python 3.3.1
Pygments 1.2.2
pysqlite 2.4.1
Python 2.5.2 (r252:60911, Jan 24 2010, 15:24:24)
[GCC 4.3.2]
pytz 2008c
setuptools 0.6c11
SQLite 3.5.9
Subversion 1.5.1 (r32289)
jQuery 1.4.2

Enabled Plugins

AnnouncerPlugin 0.12
TracFlashEmbedMacro N/A
UserStats Rev

Python Traceback

Traceback (most recent call last):
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 514, in _dispatch_request
    dispatcher.dispatch(req)
  File "build/bdist.linux-i686/egg/trac/web/main.py", line 196, in dispatch
    chosen_handler = self.default_handler
  File "build/bdist.linux-i686/egg/trac/config.py", line 631, in __get__
    self.section, self.name))
AttributeError: Cannot find an implementation of the "IRequestHandler" interface named "WikiModule".  Please update the option trac.default_handler in trac.ini.

comment:24 Changed 5 years ago by o.shirochenkov@…

Is there a way to get multiple-upload attachments with latest trunk?

Changed 4 years ago by support@…

Working multiple-attachments based on r9099

comment:25 follow-up: Changed 4 years ago by TJ <support@…>

I've attached a working patch against r9099.

comment:26 follow-up: Changed 4 years ago by Mitar

HTML5 supports multiple files to be selected in browser. And modern browser already support this.

HTML5 also supports drag&drop so it is even easier to attach files.

There exists many proof of concept implementations on the web. Also for jQuery. Would it be possible to add this to Trac?

comment:27 in reply to: ↑ 26 Changed 4 years ago by thijstriemstra

  • Cc thijstriemstra added
  • Priority changed from normal to high

Replying to Mitar:

HTML5 supports multiple files to be selected in browser. And modern browser already support this.

+1

comment:28 in reply to: ↑ 25 Changed 4 years ago by o.shirochenkov@…

Replying to TJ <support@…>:

I've attached a working patch against r9099.

Thank you, TJ, that's great! Works for me like a charm.

comment:29 Changed 4 years ago by fernan

Any ETA for having this functionality on a stable release?

Please, please, schedule it for the next release!

comment:30 follow-up: Changed 16 months ago by Mitar

I was thinking that this is probably doable through a Trac plugin. Plugin makes:

  • form area for attaching one file currently provided by Trac into a drag&drop area for dropping files
  • when a user drops files there, plugin submits all the files over Ajax over the same form which is displayed

comment:31 Changed 16 months ago by rjollos

  • Cc ryano@… removed

comment:32 Changed 9 months ago by ethan.jucovy@…

  • Cc ethan.jucovy@… added

comment:33 in reply to: ↑ 30 ; follow-up: Changed 9 months ago by Olemis Lang <olemis+trac@…>

  • Cc olemis+trac@… added

Replying to Mitar:

I was thinking that this is probably doable through a Trac plugin. Plugin makes:

  • form area for attaching one file currently provided by Trac into a drag&drop area for dropping files
  • when a user drops files there, plugin submits all the files over Ajax over the same form which is displayed

jftr , zurb theme implements this feature by adapting the solution proposed in bh:ticket:195 .

comment:34 in reply to: ↑ 33 Changed 9 months ago by jomae

Replying to Olemis Lang <olemis+trac@…>:

Replying to Mitar:

I was thinking that this is probably doable through a Trac plugin. Plugin makes:

  • form area for attaching one file currently provided by Trac into a drag&drop area for dropping files
  • when a user drops files there, plugin submits all the files over Ajax over the same form which is displayed

jftr , zurb theme implements this feature by adapting the solution proposed in bh:ticket:195 .

Also related to #9127 and th:TracDragDropPlugin.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as new The owner will remain jonas.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from jonas to anonymous. Next status will be 'assigned'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.