Ticket #303 (Closed: fixed)
Attach multimedia files to articles
Priority: | immediate | Reporter: | mira |
---|---|---|---|
Severity: | feature | Assigned to: | mugur |
Component: | Admin Interface | Status: | closed |
Version: | none | Resolution: | fixed |
Milestone: | 2.4.0 | Keywords: |
Description by mira:
Implement popup loader functionality into campsite. Allow files to be attached to articles. Ability to delete files that are attached to articles. Add syntax to template language to allow these files to be displayed on the frontend.
Administration interface
- the editor will be able to add/delete attachments to/from an article
- the administration interface will detect the mime type automatically; if it can't it will allow the editor to set it
- the attachment will have the following metadata editable by the journalist: file name, mime type, short description
- the attachment can be inserted into the article body fields
Template engine
The web designer will be able to:
- list article attachments: will list all the attachments for the current language + attachments that do not have a language associated
- print attachment file name, mime type, description, URL, size
- implement 'if attachment type', 'if attachment fileName'
Technical specs
The attachments directory structure is: HTML_DIR/attachments/[year]/[month]/[day]/[attachment_id].[extension]
Where :
- year/month/day are the time the attachment was created
- attachment_id is padded to 9 digits and cooresponds to the ID in the database
- extension is the original extension of the file name
Tables:
- Attachments: id, fk_language_id, file_name, extension, is_attachment, charset, mime_type, size_in_bytes, fk_description_id, last_modified, time_created
- ArticleAttachments: fk_article_number, fk_attachment_id
- Translations: id, phrase_id, fk_language_id, translation_text
Attachments: id is autoincrement, fk_language_id may be null and tells the language of the attachment (if any), file_name, mime_type, size_in_bytes, last_modified, and time_created are self explanatory. fk_description_id identifies the phrase_id in translations table.
ArticleAttachments links articles to attachments.
Translations table holds text that can be translated: phrase_id is the phrase identifier, fk_language_id tells the language in which the text was translated and translation_text contains the value.
Changelog
Thu Aug 19 16:26:42 2004: Modified by douglas
- component set to Admin Interface
Wed Apr 20 17:51:41 2005: Modified by paul
- milestone changed from 2.4.0 to 4.0.0
Fri Jun 3 17:37:56 2005: Modified by mugur
- milestone changed from 4.0.0 to 2.4.0
- summary changed from Allow multimedia, pdf, doc, and rtf files upload to file system on the server to Attach multimedia files to articles
Wed Aug 3 18:28:09 2005: Modified by mugur
- status changed from new to assigned
- owner changed from anonymous to mugur
Fri Aug 5 07:17:38 2005: Modified by paul
- priority changed from normal to high
Thu Oct 13 14:11:09 2005: Modified by mugur
- description changed.
- version changed from 2.4.0 to none
Thu Nov 3 16:09:00 2005: Modified by mugur
- priority changed from high to immediate
Mon Nov 7 01:42:40 2005: Modified by john
- description changed.
Mon Nov 7 02:33:58 2005: Modified by john
When it comes to actually downloading these attachments, I wonder if it would be worth allowing the content-disposition to be specified somehow. For example, content-disposition=attachment will prevent PDF files from being displayed using the Acrobat plugin, which is good if a person wants to be able to save something for later editing or reference, etc.
Also, there might be cases where you need to be able to specify the charset of the downloaded file, for example if you are making text file or SMIL attachments.
Tue Nov 8 16:44:50 2005: Modified by mugur
- description changed.
Tue Nov 8 17:27:46 2005: Modified by mugur
- description changed.
Fri Dec 2 18:50:43 2005: Modified by paul
- description changed.
Fri Dec 2 18:55:20 2005: Modified by paul
- description changed.
Fri Dec 2 20:46:05 2005: Modified by paul
- description changed.
Fri Dec 16 10:23:33 2005: Modified by mugur
- resolution set to fixed
- status changed from assigned to closed
Implementation in changeset:4223, changeset:4221, changeset:4212, changeset:4156, changeset:4155, changeset:4154, changeset:4153, changeset:4152, changeset:4151, changeset:4150, changeset:4145, changeset:4144, changeset:4143, changeset:4135, changeset:4134, changeset:4133, changeset:4129, changeset:4128, changeset:4127, changeset:4126, changeset:4125, changeset:4124
just tidied up formatting