I have downloadable products for sale.
I have created custom meta boxes to hold the file data I need, it allows me to upload fine to the custom meta the .doc and the .pdf files…
However when I try and upload a .mobi and a .epub – it doesn’t upload the files…
I suspect I will also hit issues when I try and follow the download link to download the files also – but I will cross that bridge when I come to it.
Any help on this would be fantastic.
Assuming that you are using the WordPress native Media uploader then you can use the
upload_mimes
filter hook to add or remove allowed file types, for example:You can see that to add a file type you just add to the array with the file extension as the key and the mime type as the value do the MIME type for .mobi format file is
application/x-mobipocket-ebook
and for .epub format isapplication/epub+zip