I have a Wordpress setup and my client needs users to upload large image and video files into the media library using a front-end form - NOT the wp backend.
I was thinking using something like express with a package like formidable
I want to know if it is possible to create an internal service on my vps server that wordpress could talk to.
Specifically, I want to know:
How do I hit an external url like api.domain.com/uploads and send wordpress data through to that server
How do I get the processed output back into wordpress and then save it
Here is an example on retrieving information from an external source through node.js & PHP
http://coenraets.org/blog/2012/10/creating-a-rest-api-using-node-js-express-and-mongodb/
With that said, I would personally create a shortcode by plugin design or create a theme template for this particular Form setup and with a combination of PHP, JS, Jquery, and various functions
if(is_page("page_name")) {
/*custom functions that will connect externally*/
wp_insert_comment($array_of_values); //pass values through standard PHP methods (global variables, etc)
}
Reference:
https://codex.wordpress.org/Writing_a_Plugin
http://codex.wordpress.org/Shortcode_API
http://codex.wordpress.org/Function_Reference/is_page
http://codex.wordpress.org/Function_Reference/wp_insert_comment
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.