WordPress - How to use custom rest api endpoint to upload files

Viewed 13

I'm creating some custom endpoints for a wordpress custom plugin. I need to give to users the ability to upload some files when they will use the vue app that will hold the custom registration form I'm creating.

How I can include a nonce with the post request to make it more secure and how I will get the files in the custom endpoint? I will have more than one file input and all of them will be required for the registartion. My idea is to upload the file and add the link to the file into an user meta field.

Any suggestion?

0 Answers
Related