Last Comment Bug 168680 - Possibility to attach a file to an event
: Possibility to attach a file to an event
Status: ASSIGNED
:
Product: Calendar
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: -- enhancement with 28 votes (vote)
: ---
Assigned To: Thomas Payen
:
:
Mentors:
: 208418 259490 314852 315287 350084 394324 451836 457201 473381 504852 617417 717856 924042 1121412 1124583 (view as bug list)
Depends on: 319909 504852
Blocks: 476481 845256 272732
  Show dependency treegraph
 
Reported: 2002-09-14 09:35 PDT by micah shaw
Modified: 2016-10-25 00:19 PDT (History)
60 users (show)
sylvain: needinfo? (mshaw)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description micah shaw 2002-09-14 09:35:25 PDT
Currently to associate a file with an event you must type the entire URL into
the URL box.  The ability to browes the hard drive for a file would be very
convenient for associateing presentation files with meetings.
Comment 1 Mike Potter 2002-09-16 10:44:34 PDT
That URL field is for associating the event with a website. 
There's a whole other section for relating events to files. 
Some of the code for this is already done, some still needs to be done.
Comment 2 Mike Potter 2003-06-10 09:44:45 PDT
*** Bug 208418 has been marked as a duplicate of this bug. ***
Comment 3 Mike Potter 2003-08-06 06:59:07 PDT
New contact from mikep@oeone.com to mostafah@oeone.com
Filter on string OttawaMBA to get rid of these messages. 
Sorry for the spam.
Comment 4 Michiel van Leeuwen (email: mvl+moz@) 2004-09-15 03:52:52 PDT
*** Bug 259490 has been marked as a duplicate of this bug. ***
Comment 5 Matthew (lilmatt) Willis 2005-01-07 15:27:21 PST
HW/OS -> All
Milestone -> SB0.3

I believe we need support in the new interfaces for this. Vlad knows about it.
Comment 6 Robin Edrenius 2005-08-13 04:23:21 PDT
This is fixed now.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050807 Mozilla
Sunbird/0.2+
Comment 7 gekacheka 2005-08-13 10:23:21 PDT
There is some basic UI in the sunbird event dialog but it is incomplete: there
is no underlying code to store the attachment.

Other event dialog proposals have removed the incomplete file UI.
(bug 296893 proposes using the simpler lightning dialog in sunbird,
 bug 298102 proposes an item dialog that combines the features of the lighting
dialog with the sunbird dialog.)

(In reply to comment #6)
> This is fixed now.
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050807 Mozilla
> Sunbird/0.2+

Comment 8 Robin Edrenius 2005-11-02 17:41:05 PST
*** Bug 314852 has been marked as a duplicate of this bug. ***
Comment 9 Robin Edrenius 2005-11-06 09:50:25 PST
*** Bug 315287 has been marked as a duplicate of this bug. ***
Comment 10 Matthew (lilmatt) Willis 2006-07-10 07:03:47 PDT
Reassigning all automatically assigned bugs from Mostafa to nobody@m.o

Bugspam filter: TorontoMostafaMove
Comment 11 Joey Minta 2006-08-24 13:30:05 PDT
*** Bug 350084 has been marked as a duplicate of this bug. ***
Comment 12 Matthew (lilmatt) Willis 2006-09-08 18:38:11 PDT
Not going to make the 0.3 train. Moving forward.
Comment 13 Matthew (lilmatt) Willis 2007-02-28 17:49:10 PST
Not going to make the 0.5 train. Moving forward.
Comment 14 rene 2007-10-01 13:47:59 PDT
how about adding an email (and its attachments) to an event/to do item?
the point of having a calendar with an event/to do list inside an email program is that you can associate the two ... 
Comment 15 Canis Lupus Campestris 2008-04-08 09:10:41 PDT
Why ONLY Events? Attaches will be very usefull for Tasks too - documents, spreedsheets, mindmaps...so many files are required to be attached while planning activity!!!

And such option is required: to configure where to keep attached files - just add links on files on hard drive or copy files to profile filder (globaly and for each file separately: some files or docs may be "temporary" (it is enough to add link on them), but for long-run planning aditional garantee of files safety is required (in this case files must be copied/moved to profile folder).

May be one more option: define where to keep attaches subject to Task/Event importance level?

Ooh! So many ideas. :)

Great option. +1 for it!
What about 0.9 or 1.0?
Comment 16 Bernard Desruisseaux 2008-05-09 06:00:14 PDT
(In reply to comment #1)
> That URL field is for associating the event with a website. 

This is correct. See bug 382951.
Comment 17 Laurens 2008-09-02 17:13:49 PDT
Since 0.9 will probably be one of the last standalone versions of lightning and keeping in mind that linking files to events or tasks can be seen as quite a basic and needed function in a modern business calendar, wouldn't it be reasonable to expect this feature in the 0.9 final?

Imho, not much has to be done to actually make the current solution easier; just add a browse button and allow files to be dropped on the event. Later on, one can think of places to store / configure the files, but for now, this lack of feature can really be a show-stopper... It has been requested since 2002; isn't it fair to expect it soon, after 6 years?
Comment 18 Philipp Kewisch [:Fallen] 2008-09-03 00:45:33 PDT
While I understand that many people (including myself!) would like to see this feature and it has really been an open request for a while, please understand that its not a trivial task to do. We've only recently looked into this feature and fixed some dependent bugs.

We are expecting an rc1 beginning of next week, therefore I don't think this feature will make it into 0.9 (sorry!). Unfortunately its not just adding a browse button. While the UI side is indeed quite easy, we have to think about how things should be done under the hood. The "easy" solution is to just attach the file:/// url, but as soon as you have a remote calendar, this means that the file url will be invalid on any other computer.

The next possibiility is to use a binary attachment in the ICS file. This in turn needs some upstream fixes with libical, which isn't something we can do short term, and also we'll need a number of security features we haven't had resources to put thought into: Making attachments available for virus scanners, how to handle attachments received via email, how to store attachments when passing the items around inside the application (i.e we wouldn't want to have the whole binary attachment on each event in the views, the unifinder, the minimonth, since that would eat a lot of memory)

As you see, a lot needs to be done, if you are interested in helping out, please do contact me :-)
Comment 19 Philipp Kewisch [:Fallen] 2008-09-29 00:39:08 PDT
*** Bug 457201 has been marked as a duplicate of this bug. ***
Comment 20 Philipp Kewisch [:Fallen] 2008-10-10 06:11:56 PDT
*** Bug 394324 has been marked as a duplicate of this bug. ***
Comment 21 Carl 2008-10-11 09:46:23 PDT
I'll be darned. I am trying this on an Arch installation with KDE4, and it works splendidly. Lightning obeys the file associations set by KDE4 so I can open every file I attach. Attaching is simply a matter of dragging the file to the attachment dialog (need to delete default 'http://' string'). Is this the 'freedesktop' standardization paying off?

So, if in a future I can just drag and drop onto the task box, that would be cool, but I am one happy camper already.
Comment 22 Philipp Kewisch [:Fallen] 2009-01-14 00:30:04 PST
*** Bug 473381 has been marked as a duplicate of this bug. ***
Comment 23 Andrea Classen 2009-02-04 01:41:02 PST
*** Bug 476481 has been marked as a duplicate of this bug. ***
Comment 24 Andrea Classen 2009-02-04 01:48:39 PST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5)
Gecko/2008120122 Firefox/3.0.5 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1b3pre) Gecko/20090202 Lightning/1.0pre Shredder/3.0b2pre

When connecting to a SUN calendar, no attachment button is active, not even on
a link level. 

Details are described here: Bug 476481 (now listed as a duplicate)

Besides that, I'd really underline the wish to have an add attachment option,
and it is possible with WCAP/SUN calendar as well: "All commands used to fetch
events and tasks can take a fetchattach parameter." There is also an uploadfile
command.

Thank you!
Comment 25 Philipp Kewisch [:Fallen] 2009-10-10 13:25:51 PDT
*** Bug 451836 has been marked as a duplicate of this bug. ***
Comment 26 Philipp Kewisch [:Fallen] 2010-03-05 13:28:22 PST
*** Bug 504852 has been marked as a duplicate of this bug. ***
Comment 27 skre 2010-03-09 00:58:48 PST
I fully agree with Andrea. This feature is very important.
Comment 28 patrick.abiven 2010-05-10 04:15:58 PDT
Hello
As far as Libical is now supporting inline attachment (for example KOrganizer uses inline attachments provided by Libical), is this feature on your roadmap ? And how can we contribute ?
Regards
Patrick
Comment 29 Eric Tiffany 2010-12-07 13:12:01 PST
*** Bug 617417 has been marked as a duplicate of this bug. ***
Comment 30 Eric Tiffany 2010-12-07 13:14:01 PST
Also, this feature is mandatory in order to comply with CalDAV  as
mandated by rfc 4791 (http://tools.ietf.org/html/rfc4791#section-8.5)
Comment 31 Thomas Payen 2011-01-14 05:29:19 PST
Hello
We have started working on the events attachments for the lightning 1.0b3 version.
For that we will use the libical ATTACH component which normally support URI and inline attachments.
If someone has worked on this implementation or wants to exchange on the subject, please contact me on my email.
Regards,
Thomas Payen
Comment 32 Philipp Kewisch [:Fallen] 2011-01-14 09:56:54 PST
Hello Thomas,

thanks for looking into this bug. Let me know if you need help setting things up. The latest version of calendar source is available via comm-central, there may be some general issues though. If you are experiencing issues, try applying the patch in bug 591744.

To ease up the review cycle, I'd suggest you contact me and let me know what you have planned, w.r.t interfaces and how you'd like to implement it (i.e where inline files are stored, etc).

If you need assistance, I am available per email (mozilla at kewis ch), or via IRC (irc.mozilla.org / #calendar. My nick is Fallen).
Comment 33 Philipp Kewisch [:Fallen] 2011-02-13 11:54:45 PST
Thomas, has your group made any progress here?
Comment 34 Thomas Payen 2011-02-14 08:17:52 PST
Hello Philip,

We hadn't a lot of time to work on it, last week.
But this week, we have plan to work on events attachments.

We actually work on a simple case : attachments in a simple event in a local calendar.
We work on the storage : SQLlite does not seem to be a good option for the storage of the attachment due to the performance. So we are looking for others solutions like storing the URI of the attachment in the database and the file in a temp folder (mozilla cache storage folder ?).

We have not already worked on libical to check if the BINARY attachment is include (maybe yes ?).

If you have some extra information about this points (or others) we can exchange on it by email.

Regards,
Thomas Payen
Comment 35 Philipp Kewisch [:Fallen] 2011-02-14 09:20:05 PST
(In reply to comment #34)
> We actually work on a simple case : attachments in a simple event in a local
> calendar.
> We work on the storage : SQLlite does not seem to be a good option for the
> storage of the attachment due to the performance. So we are looking for others
> solutions like storing the URI of the attachment in the database and the file
> in a temp folder (mozilla cache storage folder ?).
Yes, I agree sqlite is not a good format to store the actual files. The profile directory can be used for storing such files, we have a subdirectory calendar-data, I think it would be a good idea to create a further subdirectory containing the files per calendar. You'll obviously need to store some sort of metadata so the file cache can be used instead of re-downloading the file from the ics stream.

I think it won't be easy to convey the storage mechanism to the user though. We will have the same issue the Thunderbird compose dialog also has: If I attach a file to an event in the dialog, is the current state copied, or will it be copied when the dialog is closed. Calendar additionally has the issue that its at least theoretically possible to save a link instead of the file itself. This needs to be made clear even to casual users. Maybe it makes sense to only allow attaching files inline, not via link (execpt if its a remote link, of course).


> We have not already worked on libical to check if the BINARY attachment is
> include (maybe yes ?).
I believe its generally supported, but last I heard there are a few limitations that need to be fixed in libical. See for example bug 557782. Also, I believe all that libical supports is setting the base64 encoded file data as a property (which happens in memory). This means our memory consumption will increase if we don't watch out. Especially when cloning items (which happens often) this will be an issue.

I guess we need to find a way to keep the file data out of memory as long as possible and only include it when its really needed. Some drastic changes to libical may be needed.

> If you have some extra information about this points (or others) we can
> exchange on it by email.
Sure thing. If you like you can also use this bug for ideas interesting to a broader audience.
Comment 36 Philipp Kewisch [:Fallen] 2011-03-01 03:24:42 PST
Thomas, these bugs could interest you, as they assist in being able to support files:


bug 637064 - The newest libical contains some fixes that improve ATTACH support, especially with binary attachments.
bug 632352 - Contains a fix that doesn't cause dataloss for binary attachments when using the event dialog.
Comment 37 Thomas Payen 2011-03-01 05:18:51 PST
Hello Philipp,
Thanks for your precisions.
In fact, I am in the same company than PMARTINAK (this was perhaps not obvious).
So we work together on the event attachment implementation. This is why we found the bug 632352.

For us the first step is to release to our users a version of Lightning which don't crash with ATTACH property. Then we will release the version with entire support of ATTACH property, which involve to have two version in parallel.
Thomas
Comment 38 gagne.patrick 2011-06-20 05:26:05 PDT
Any news for this feature request?
Comment 39 Thomas Payen 2011-06-23 02:31:00 PDT
Hi Patrick
We actually working on it...
The recent change of strategy for the Lightning versioning has increase the difficulty, but we hope release the feature at the end of the summer.
Thomas
Comment 40 Philipp Kewisch [:Fallen] 2011-07-25 13:38:50 PDT
Thomas, how are things going along? Is there anything I can do to better support you?
Comment 41 Thomas Payen 2011-07-26 02:08:17 PDT
Hi Philipp, I was just thinking to send you an e-mail.

I'm working on the implementation of the binary attachment since you have release lightning with the last libical version. But, because of our constraints, we are working on a 1.0b3pre custom version with libical 0.46 ... Then the idea is to report the fonctionnality from our 1.0b3pre to the last version of Ligthning.

My choice of implementation is to use the async methods to load the binary attachment.
For exemple the user adds an attachment to an event, when he saves his event, the asyncFetch method is call to load the attachment in memory. For me, this is the best solution not to consume too much memory.

The OpenAttachment method, when the user open the attachment, always uses the uri.

For the storage of the attachments, I used the ProfD/calendar-data directory. But, for memory calendar, maybe we can use a thing like TmpD directory ?

I have also worked on the compatibility of the attendee invitation with outlook, with a ATTACH:CID in the ICS link to the Content ID attach in the mime message.

I still have to work on the acceptation of invitations with attachments and keep compatibility with most products.

I have some interrogations about cached calendar, I don't understand why we always call adoptItem, modifyItem and deleteItem methods twice ? Once iteratively, and an other call with the listener. This leads to problems when the attachment is written in a file with the asyncCopy method.

Thomas
Comment 42 Philipp Kewisch [:Fallen] 2011-09-14 01:46:00 PDT
Hi Thomas,

about calling those methods twice, do you mean the onModifyItem call? The idea is that first you notify the provider that the item should be changed (modifyItem), then the provider changes it (asynchrounously at best), and then notifies the calendar components that the item has been modified (onModifyItem).

Sorry for the late reply!
Comment 43 Dwig 2011-09-14 19:48:38 PDT
Having used my Lightning calendar for some time now (currently at 1.0b2, in Tbird 1.3.14 on Windows XP), I just did my first attachment of a file to an event.  Here's my experience attaching a file (actually a pathname to a local file):

- Click the Attach toolbar item
- See the "http://", replace it by the pathname of the file (C:\...\file.pdf); hit OK
- Attachment shows up in the Attachements list of the event; so far so good.
- Double click on the attachment -- it executes Irfanview, an image viewer, which doesn't understand PDF files.  Why this association?
- Right click on the attachment -- no useful alternatives to "Open".  In fact, I can't even copy the path.  The only way to open the attachment is to manually copy the path into, say, Windows Explorer, then open the file from there.
- After some thought, hit Attach again, and enter "file:///c:/.../file.pdf", hit OK.
- Double click on the resulting attachment.  Get a better result: it asks what application to use to open the file.
- Choose my Foxit Reader exe, hit OK.  Foxit opens, but no file is loaded.
- Choose Open in Foxit -- aha, we're in the right folder!  Choose the file.

Conclusion: this function needs some serious work to be really usable for files.  (Out of curiosity, I attached an http: URL -- that worked fine, opening the page in Firefox.)
Comment 44 Philipp Kewisch [:Fallen] 2011-09-15 02:34:38 PDT
Dwig, we have someone working on it. Please note that 1.0b2 is not the latest version. If you upgrade to Thunderbird 6 then you get 1.0b5. I'm not saying file attachment support is fixed there, but just a side note :)
Comment 45 Nick Milas 2012-04-27 05:16:46 PDT
Any progress on this? We are in TB 12 with Lightning 1.4 and we still can't attach files. 

It would be important to be able to link Events to mail messages too! So, an event would include a list of associated (related/linked) messages.

I believe this is a critical enhancement. 

An anticipated availability date for the feature?
Comment 46 Nick Milas 2012-05-09 03:03:19 PDT
I have followed instructions by Dwig to manually attach files to an Event (in Lightning).

This works and clicking the attachment will try to open the attachment with an application. I've tried with an MS Word (.doc) file and, when asked, I browsed and located winword.exe. The file opened successfully.

However, this does not work with other types of files. For example, when trying to open an (attached) .jpg or .txt or .pdf file, I browse for the respective application (Irfanview or wordpad.exe/write.exe or acrobat.exe respectively), but it fails to open. 

Irfanview says: "file: : Can't read file header ! Unknown file format or file not found !". The other programs report similar errors. 

Is there a workaround so that files can open correctly by the selected application? Why doc files open and the others not?
Comment 47 Gabriel Forster 2013-04-26 11:19:40 PDT
There is an open-source Add-On called Exchange 2007/2010/2013 Calendar, Tasks, Contacts and GAL Provider Add-on for Lightning available here: http://www.1st-setup.nl/wordpress/?page_id=133

This works very well when dealing with Exchange calendars (as well as the Free/Busy information, but that is for another topic)

One of the features is the ability to add attachments to Events. The relevant portion of code is here: https://github.com/1stsetup/exchangecalendar/tree/master/components

What is stopping the relevant portion of code from being ported over as a native part of Lightning?
Comment 48 gagne.patrick 2013-10-22 06:58:16 PDT
Hi all, I have another ideas about adding another possibility for including file to an event. I don't know if it's a good idea...

Why not using the same "mechanic" which was used for email file attachment.  When we add an attachment to an event, it was uploaded to the cloud storage account like ubuntuone,etc. The download link returned will be used when we click on the name of the file and the download/open file windows will appear to select our choice.
Comment 49 gagne.patrick 2013-10-22 07:00:02 PDT
Please remove comment #48 and use this one..

Hi all, I have another ideas about adding another possibility for including file to an event. I don't know if it's a good idea...

Why not using the same "pattern" which was used for attaching files to email.  When we add an attachment to an event, it was uploaded to the cloud storage account like ubuntuone,etc. The download link returned will be used when we click on the name of the file and the download/open file windows will appear to select our choice.
Comment 50 dynvec 2013-11-26 19:44:08 PST
Please make an interface to point to the file directly. That would avoid finding the path the replace back slashes by front ones then prepend "file:///". It's good that there's the possibility to begin with but a plan to improve would be nicer. 

Thanks
Comment 51 Philipp Kewisch [:Fallen] 2014-09-28 14:22:35 PDT
*** Bug 924042 has been marked as a duplicate of this bug. ***
Comment 52 Sylvain DENIS 2014-10-31 07:14:19 PDT
Hello

when the develop comming

A very big group hope to use the file link (not web)

thanks for development
Comment 53 [:MakeMyDay] 2014-12-16 10:05:23 PST
*** Bug 717856 has been marked as a duplicate of this bug. ***
Comment 54 [:MakeMyDay] 2015-01-14 13:56:26 PST
*** Bug 1121412 has been marked as a duplicate of this bug. ***
Comment 55 btcolin 2015-01-15 00:42:09 PST
Is there any timescale for this feature to be completed in Lightning? I have been hoping for several years now to be able to drop Outlook and fully migrate to Thunderbird/Lightning
Comment 56 fya.please 2015-01-22 01:51:55 PST
Could you please let us know any alternative way to attach a file in a meeting invite send through lighting calendar.
Comment 57 Philipp Kewisch [:Fallen] 2015-01-22 02:06:14 PST
There is currently no development on this specific feature, since it requires some performance improvements to be completed in other bugs.

The alternative way is to use Filelink, here is how to set up: https://support.mozilla.org/en-US/kb/filelink-large-attachments

Once you have done that, you will find new options in the event dialog.
Comment 58 [:MakeMyDay] 2015-01-22 10:13:24 PST
*** Bug 1124583 has been marked as a duplicate of this bug. ***
Comment 59 John Bennett 2016-09-04 02:37:10 PDT
So this is still in limbo....?

Note You need to log in before you can comment on or make changes to this bug.