Project

General

Profile

Actions

Defect #18667

closed

Attachment content type not set when uploading attachment

Added by Thomas Löber over 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Category:
Attachments
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hi,

I noticed that the attachment content type is not set when uploading an attachment. Do you also experience this behaviour?

I think this is caused by setting the file contents before setting the file name. (The content type is determined by the file name).

I have attached a patch (from my personal Git repo) which resolves this problem.

Regards,
Thomas


Files

set_attachment_content_type_on_upload.patch (755 Bytes) set_attachment_content_type_on_upload.patch AttachmentController#upload patch Thomas Löber, 2014-12-17 11:51
Actions #1

Updated by Jean-Philippe Lang about 9 years ago

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.6.1
  • Resolution set to Fixed

Fixed in r13787, thanks for reporting this. The fix was done at model level instead.

Actions #2

Updated by Jean-Philippe Lang about 9 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF