Here's a forum blog post that is more about images, but has the general command syntax info, as well as info on how to add the attributes: https://www.infopathdev.com/blogs/mel_balsamo/archive/2017/09/05/how-to-save-images-to-sharepoint.aspx
You could also check our YouTube content - this command has been around for a while, so some of what you'll find is pretty ancient. Basically, in FormsDesigner, inject your form with qRules. Then you can use the SaveToSharePoint and other commands in your form.
Hilary Stoupa