Upload user-submitted files from the frontend

Go to source

From: wpsnipp.com
By:

There are many use cases for allowing users to upload files from the frontend, but the trick is making sure the file is uploaded and saved in the WordPress media library correctly. You can easily use standard PHP functions to handle the upload and then store the file wherever you like, but then you won’t be able to take advantage of the attachment system that WordPress uses. An image that is uploaded correctly, for example, will have all the various sizes available as well as the meta data, such as title, description and caption. You will also be able to edit all of this from the media library in your WordPress dashboard.

link: Upload user-submitted files from the frontend


Upload user-submitted files from the frontend is a post from: wpsnipp.comWordPress Snippets, Code, Hacks, 615+ for your wordpress theme or blog.