OwnYourGram
OwnYourGram copied to clipboard
Videos showing up as .jpg
I see PR #46 that should set a .mp4 extension, however, videos to my site are loading as a gallery of a video thumbnail, followed by the video but with a .jpg extension. If I download, rename to .mp4 and re-upload, it's all fine, but any idea why this isn't working?
This should solve it. However this also tells me that your site is using the filename in the media upload instead of determining its own, which is dangerous in general. (never trust user input etc). Anyway let me know if this fixes it for you.
@aaronpk thanks! I'm using WordPress with the micropub extension, so perhaps it's doing that somewhere in there. I'll have to post a video to test it out.
Micropub on WordPress uses the built in WordPress functions for media upload. There was recently something about how WordPress handled media upload files.
https://make.wordpress.org/core/2018/12/13/backwards-compatibility-breaks-in-5-0-1/
@aaronpk
I've tested:
- [x] Can video/mp4 be uploaded to media library?
- [x] Can video/mp4 be uploaded via core REST API endpoint?
- [x] Can video/mp4 be uploaded via micropub media endpoint?
- [x] Can
copy_to_media_endpoint
by itself, successfully upload a video/mp4? (I pulled it out into a simple script, and it worked.
However, If I hit the "Post" button from OYG, the video is blocked, and my error log has a line that says:
Micropub Error: 500 invalid_request - Sorry, this file type is not permitted for security reasons.
I have no idea why it would be failing if all the other tests pass, but it seems to be an issue with OYG or with the file passed by Instagram.