Saving/Writing/Adding file to upload folder

Within a plugin I am generating an image, I would like to save this image to the upload folder and update the WPDB with the location of said file. I cant find any build in wordpress functions to handle saving/writing/adding a file to the upload folder, should I just do this the old fashioned way with php, or is there something built into WordPress that I’m missing?

2 Answers
2

Check into the functions: wp_handle_upload() and media_handle_upload()

Leave a Comment