-
Author
-
December 9, 2015 at 12:10 #92054GianzoParticipant
Hi there!
I’m trying to upload an .epub file to the Media Library but unfortunately I get an error message due to security issues. So I worked on the Child Theme and added this lines of code inside the functions.php:
COPY CODEfunction addUploadMimes($mimes) { $mimes = array_merge($mimes, array( 'epub|mobi' => 'application/octet-stream' )); return $mimes; } add_filter('upload_mimes', 'addUploadMimes');
Then I saved it and noticed that the back-end’s layout got messed up, so I removed the code, saved it again and everything got back as normal.
But I can’t still upload .epub files! Do you know how to do this properly?
Thanks for your support!
Gian
December 9, 2015 at 14:40 #92073sharmstrModeratorI added the code to my site and didnt see any issues with the layout. Is the layout messed with this code and the WP 2015 Theme enabled?
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
December 9, 2015 at 14:41 #92074sharmstrModeratorObviously you’ll have to move the code to the 2015 theme to test.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
December 9, 2015 at 14:46 #92077sharmstrModeratorYes
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
December 9, 2015 at 14:55 #92084GianzoParticipantThat’s the reason,Sharmstr: I think the messed-up-layout issue is related to Mac only (which is the machine and OS I’m currently using).
Any suggestion for the Mac?However, I think I found a sort of work-around: instead of uploading the .epub file, I’m thinking about compressing the .epub file into a .zip one (so that WordPress can allow its upload) and then let users download it and uncompress it for themselves. Do you think this is a good solution?
Gian
December 9, 2015 at 15:01 #92085sharmstrModeratorI’m not familiar with this, so no suggestions. Kleo doesnt touch any of this.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionThis support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com
-
AuthorPosts
You must be logged in to reply to this topic.