Show attachments lacking a Content-Disposition: Bug #713830

Attachments without Content-Disposition are now generated and shown
in the client.  This requires a database upgrade as well as rescanning
all messages to generate the previously missing attachments.

In addition, this upgrade now stores the attachments' Content-ID in
the database.  This makes it much easier for the client to associate
a particular MIME section in the RFC822 message with an attachment in
the database and on disk.
This commit is contained in:
Jim Nelson 2014-08-12 14:22:57 -07:00
parent a335616741
commit a9db6e8c44
8 changed files with 163 additions and 18 deletions

10
sql/version-022.sql Normal file
View file

@ -0,0 +1,10 @@
--
-- Database upgrade to repopulate attachments. Bug #713830 revealed that
-- non-text and non-image files with no Content-Disposition were being dropped.
-- Also add Content-ID to database so attachments in RCF822 messages can be paired
-- to extracted attachments on filesystem.
--
ALTER TABLE MessageAttachmentTable ADD COLUMN content_id TEXT DEFAULT NULL;
ALTER TABLE MessageAttachmentTable ADD COLUMN description TEXT DEFAULT NULL;