Skip to content

Commit

Permalink
fix(sipi): remove support for audio/mp4 file format (DEV-1300) (#2195)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpro7 committed Sep 5, 2022
1 parent e0a0fbb commit 122bf52
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
7 changes: 5 additions & 2 deletions docs/01-introduction/file-formats.md
Expand Up @@ -5,7 +5,10 @@

# File Formats in DSP-API

Currently, only a limited number of file formats is accepted to be uploaded onto DSP. Some metadata is extracted from the files during the ingest but the file formats are not validated. Only image file formats are currently migrated into another format. Both, the migrated version of the file and the original are kept.
Currently, only a limited number of file formats is accepted to be uploaded onto DSP.
Some metadata is extracted from the files during the ingest but the file formats are not validated.
Only image file formats are currently migrated into another format.
Both, the migrated version of the file and the original are kept.

The following table shows the accepted file formats:

Expand All @@ -14,7 +17,7 @@ The following table shows the accepted file formats:
| Text, XML<sup>1</sup> | TXT, XML, XSL, XSD | No |
| Tables | CSV, XLS, XLSX | No |
| 2D Images | JPG, JPEG, JP2, PNG, TIF, TIFF | Yes, converted to JPEG 2000 by [Sipi](https://github.com/dasch-swiss/sipi) |
| Audio | MPEG (MP3), MP4, WAV | No |
| Audio | MPEG (MP3), WAV | No |
| Video | MP4 | No |
| Office | PDF, DOC, DOCX, PPT, PPTX | No |
| Archives | ZIP, TAR, GZ, Z, TAR.GZ, TGZ, GZIP, 7Z | No |
Expand Down
2 changes: 1 addition & 1 deletion docs/03-apis/api-v2/editing-values.md
Expand Up @@ -236,7 +236,7 @@ the following types of files:

* Images: JPEG, JPEG2000, TIFF, or PNG which are stored internally as JPEG2000
* Documents: PDF
* Audio: MPEG, MP4, or Waveform audio file format (.wav, .x-wav, .vnd.wave)
* Audio: MPEG or Waveform audio file format (.wav, .x-wav, .vnd.wave)
* Text files: TXT, XML, or CSV
* Video files: MP4
* Archive files: ZIP, TAR, GZIP
Expand Down
3 changes: 0 additions & 3 deletions sipi/scripts/file_info.lua
Expand Up @@ -25,7 +25,6 @@ local APPLICATION_XML = "application/xml"
local TEXT_XML = "text/xml"
local TEXT_PLAIN = "text/plain"
local AUDIO_MP3 = "audio/mpeg"
local AUDIO_MP4 = "audio/mp4"
local AUDIO_WAV = "audio/wav"
local AUDIO_X_WAV = "audio/x-wav"
local AUDIO_VND_WAVE = "audio/vnd.wave"
Expand Down Expand Up @@ -56,7 +55,6 @@ local image_mime_types = {

local audio_mime_types = {
AUDIO_MP3,
AUDIO_MP4,
AUDIO_WAV,
AUDIO_X_WAV,
AUDIO_VND_WAVE
Expand Down Expand Up @@ -94,7 +92,6 @@ local video_mime_types = {

local audio_extensions = {
"mp3",
"mp4",
"wav"
}

Expand Down
2 changes: 1 addition & 1 deletion webapi/src/main/resources/application.conf
Expand Up @@ -326,7 +326,7 @@ app {
]
text-mime-types = ["application/xml", "text/xml", "text/csv", "text/plain"]
video-mime-types = ["video/mp4"]
audio-mime-types = ["audio/mpeg", "audio/mp4", "audio/wav", "audio/x-wav", "audio/vnd.wave"]
audio-mime-types = ["audio/mpeg", "audio/wav", "audio/x-wav", "audio/vnd.wave"]
archive-mime-types = [
"application/zip",
"application/x-tar",
Expand Down
Expand Up @@ -165,7 +165,6 @@ class ValueUtilV1(private val settings: KnoraSettingsImpl) {
"application/zip" -> "ZIP",
"application/x-compressed-zip" -> "ZIP",
"audio/mpeg" -> "AUDIO",
"audio/mp4" -> "AUDIO",
"audio/wav" -> "AUDIO",
"audio/x-wav" -> "AUDIO",
"audio/vnd.wave" -> "AUDIO",
Expand Down
Expand Up @@ -278,7 +278,6 @@ object RouteUtilV1 {
*/
private val audioMimeTypes: Set[String] = Set(
"audio/mpeg",
"audio/mp4",
"audio/wav",
"audio/x-wav",
"audio/vnd.wave"
Expand Down

0 comments on commit 122bf52

Please sign in to comment.