-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[4.3] PISTON-1170: Update content type on media attachments (#6674)
The `kzm_message:forward_message/4` function branches, depending on whether the user has recorded an additional message to be prepended to the voicemail message being forwarded. Prepending the additional message requires the two media files to be merged into a temporary file. This is then written to the database as an attachment. Prior to this fix, the code assumed that the merged media file has an `mp3` format, which is not necessarily true. In addition, it did not pass any content-type option to the `kz_datamgr:put_attachment/5` function which actually writes the attachment. As a result, the attachment metadata in the database always indicated a content-type of `application/octet-stream`. Calls to `kz_media_util:join_media_files/2` now ensure that the merged output format is specified explicitly, rather than relying on default behaviour. The same format is also mapped to the corresponding MIME type which is passed to `kz_datamgr:put_attachment/5` to ensure the attachment metadata is correct.
- Loading branch information
1 parent
8c35973
commit 44c449e
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters