I have read this resource about uploading a file to an asset field on an entry, but I believe I need to create the asset on its own because the asset has 2 custom fields associated with it that I want to define upon its creation. Is there not something like an 'assets/save-asset' action I can use to save an asset element without having to attach it to an entry?
Update: With Marion's help I'm a little closer. Side note: apparently 'assets/save-asset' is now depreciated in favor of 'assets/upload' so I'm using that. Here is my form:
<form method='post' accept-charset='UTF-8' enctype='multipart/form-data'>
{{ csrfInput() }}
{{ actionInput('assets/upload') }}
{{ hiddenInput('folderId', 7) }}
{{ hiddenInput('title', 'cool image')}}
<input name='file' type='file'>
<input type='submit' value='submit'>
</form>
But I am now getting a 400 Bad Request error with the message No file was uploaded
. What am I doing wrong to not have my file attach correctly?