I'd rather not use Wordpress' built-in media uploader.

I've got a form (around the frontend) of my website, and I have to allow anybody to upload a picture to my uploads folder in wordpress-content. I have found many lessons, however they all let me know how to get it done using the wordpress uploader. I have to have the ability to validate what customers are uploading.

Any assistance is greatly appreciated!!!


Solved. This is actually the code I did previously get it done:

During my code:

require_once(ABSPATH . "wp-admin" . '/includes/image.php');
require_once(ABSPATH . "wp-admin" . '/includes/file.php');
require_once(ABSPATH . "wp-admin" . '/includes/media.php');

$attachment_id = media_handle_upload('file-upload', $post->ID);

During my form:

<input type="file" name="file-upload" id="file-upload" />