In audb 1.7.0 we added support to publish not only audio and video files, but every file format a user would like to publish.
This means we should also adjust process_index(), process_file(), process_files(), process_folder() to support other files.
The question is how to best support text files:
- Should we pre-define a list of file extension(s), that are then treated as text files?
- Should we check the mime-type of a file, to see how to handle it (might slow things down)?
- Should we use
try and except statements (could be tricky as audio files might also fail for audiofile if ffmpeg is not installed)
And how to return the content of a text file:
- Should it be a text string?
- Should it be a JSON string?
/cc @maxschmitt
In
audb1.7.0 we added support to publish not only audio and video files, but every file format a user would like to publish.This means we should also adjust
process_index(),process_file(),process_files(),process_folder()to support other files.The question is how to best support text files:
tryandexceptstatements (could be tricky as audio files might also fail foraudiofileifffmpegis not installed)And how to return the content of a text file:
/cc @maxschmitt