That works, but that’s not what I wanted. 
I want to let user to upload file, set the title of the file and set the media category (for media categories I’m using Admin and Site Enhancements by Bowo).
In my form settings there is a problem that form saves 2 objects - “post” and media file. The “post” has the correct media category and correct title. The second object is the media file without any other attributes from the form. From my point of view there is a problem in form action Create post with Post type = media and my Field mapping.
My (exported) template is here, to give you full “context”. 
{
"id": 2656,
"name": "pridani-souboru",
"title": "Přidání souboru",
"date": "2025-10-15 07:52:51",
"date_formatted": "15. 10. 2025",
"author": {
"name": "-",
"avatar": "https://secure.gravatar.com/avatar/8bc8e75e407fce43a3c20dbd2f4669f00910633cb73a651f76b3a4e05c39f4f4?s=60&d=mm&r=g",
"url": "anonymized"
},
"permalink": "anonymized",
"thumbnail": null,
"bundles": [],
"tags": [],
"type": "popup",
"content": [
{
"id": "adcmak",
"name": "section",
"parent": 0,
"children": [
"xmaxlz"
],
"settings": []
},
{
"id": "xmaxlz",
"name": "container",
"parent": "adcmak",
"children": [
"uocaxd"
],
"settings": []
},
{
"id": "uocaxd",
"name": "form",
"parent": "xmaxlz",
"children": [],
"settings": {
"fields": [
{
"type": "text",
"label": "Název souboru",
"placeholder": "Název souboru",
"id": "begmsk",
"required": true
},
{
"type": "textarea",
"label": "Popis",
"placeholder": "Popis souboru",
"id": "3395c3"
},
{
"type": "file",
"label": "Soubor",
"placeholder": "Your Name",
"id": "uqkfxe",
"fileUploadLimit": "1",
"fileUploadStorage": "attachment",
"fileUploadAllowedTypes": "pdf,jpg,jpeg,png,gif,bmp,doc,docx,xls,xlsx,ppt,pptx,txt,csv,zip,rar,7z,mp3,mp4,avi,mov,mkv",
"required": true
},
{
"type": "email",
"label": "Email",
"placeholder": "Email",
"id": "brbfzh",
"isHoneypot": true
},
{
"type": "select",
"label": "Category",
"id": "sfdnzs",
"value": "verejne"
}
],
"submitButtonStyle": "primary",
"successMessage": "Soubor byl úspěšně nahrán.",
"emailSubject": "Contact form request",
"emailTo": "admin_email",
"fromName": "anonym",
"emailErrorMessage": "Submission failed. Please reload the page and try to submit the form again.",
"htmlEmail": true,
"mailchimpPendingMessage": "Please check your email to confirm your subscription.",
"mailchimpErrorMessage": "Sorry, but we could not subscribe you.",
"sendgridErrorMessage": "Sorry, but we could not subscribe you.",
"horizontalAlignFields": "center",
"submitButtonWidth": "100",
"redirectTimeout": "2000",
"redirect": "/soubory/",
"actions": [
"redirect",
"create-post"
],
"createPostTitle": "begmsk",
"createPostContent": "3395c3",
"createPostTaxonomies": [
{
"id": "osokax",
"taxonomy": "asenha-media-category",
"fieldId": "sfdnzs"
}
],
"createPostType": "attachment"
},
"themeStyles": []
}
],
"templateType": "popup",
"globalVariables": [
{
"name": "task-divider-size",
"value": "1rem",
"id": "ukzoee"
},
{
"id": "xedmqx",
"name": "meta-data-font-size",
"value": "1.4rem"
}
]
}