Upload HTML files through REST API
-
Hello, I need to find a way to upload HTML files through the wordpress REST API to any wordpress account/project, please help! Thanks in advance :)
-
You can use https://developer.wordpress.com/docs/api/1.1/post/sites/%24site/media/new/ to upload any accepted file type to a WordPress.com site: https://wordpress.com/support/accepted-filetypes/
Unfortunately, .html is not an accepted file type here.
-
I just read in this website
https://blog.hubspot.com/website/file-type-not-permitted-security-reasons
that editing your wp-config.php file can let you upload any kind of files, will that also make it available to upload them via REST api? -
We do not offer editable wp-config files on our WordPress.com managed hosting service. It sounds like you may have a self-hosted WordPress site, which are sites that you create on a “traditional web host” like Bluehost, GoDaddy, etc.
To clarify, your host uses the open-source variant of the WordPress platform which functions differently than the custom managed variant of the software we offer here on WordPress.com. Because of this we’re not able to assist. It is possible that your host will permit such uploads but you will need to confirm that with them directly.
If you are new to working with wp-config files, the good news though is that help is available here at the open-source WordPress forums: https://wordpress.org/support/forum/how-to-and-troubleshooting/
Hope this helps point you in the right direction!
- The topic ‘Upload HTML files through REST API’ is closed to new replies.