-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploader Not Accepting FLAC Files #171
Comments
I also found that some .mp3 files have a MIME type of diff --git a/application/libraries/MY_Upload.php b/application/libraries/MY_Upload.php
--- a/application/libraries/MY_Upload.php (revision 9a742739aa3125233631854de5a35d9f8591f650)
+++ b/application/libraries/MY_Upload.php (date 1700154035842)
@@ -46,4 +46,19 @@
return rename($path.$original, $path.$new_filename);
}
+ /**
+ * Override application/octet-stream on file_type
+ *
+ * @param array $file
+ * @return void
+ */
+ protected function _file_mime_type($file)
+ {
+ parent::_file_mime_type($file);
+
+ if ($this->file_type == 'application/octet-stream' && !empty($file['type']))
+ {
+ $this->file_type = $file['type'];
+ }
+ }
}
\ No newline at end of file |
It's a good instinct to be weary of those files :) I think until someone reports it as being a problem, we can stick to solving the FLAC issue (which you have, thanks!). |
Our uploader at https://librivox.org/uploader used to accept FLAC files. It appears to no longer accept them, returning an error:
undefined NaN KB Error The filetype you are attempting to upload is not allowed.
This was first noticed end of December; I don't know if it was a problem earlier than that. It is just verified with at least 2 people, one exporting using Audacity and one using Sony Sound Forge.
The text was updated successfully, but these errors were encountered: