Enable audio and video uploads

This commit is contained in:
silverpill 2023-03-12 20:13:53 +00:00
parent cb7bc04b64
commit 43d084de8d
3 changed files with 6 additions and 2 deletions

View file

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]
### Added
- Enabled audio and video uploads.
### Changed
- Save latest ethereum block number to database instead of file.

View file

@ -26,7 +26,7 @@ async fn create_attachment_view(
&attachment_data.file,
attachment_data.media_type.clone(),
&config.media_dir(),
Some("image/"),
None,
)?;
let db_attachment = create_attachment(
db_client,

View file

@ -37,7 +37,7 @@ pub fn save_b64_file(
b64data: &str,
maybe_media_type: Option<String>,
output_dir: &Path,
maybe_expected_prefix: Option<&str>,
maybe_expected_prefix: Option<&str>, // deprecated
) -> Result<(String, usize, String), UploadError> {
let file_data = base64::decode(b64data)?;
let file_size = file_data.len();