Cannot upload file to entry in CP from a form in the frontend of the site.

The flash message in the CP is: Entry could not be saved.

{% set section = craft.sections.getSectionByHandle('areaprivada') %}
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
    {{ csrfInput() }}
    <input type="hidden" name="action" value="entries/save-entry">
    {{ redirectInput('/') }}
    <input type="hidden" name="sectionId" value="{{ section.id }}">
    <input type="hidden" name="enabled" value="1">

    <label>Enviar CV</label><br/><br/>
    <input type="file" name="fields[curriculum]">

    {% if entry is defined %}
        {{ errorList(entry.getErrors('file')) }}
    {% endif %}

    <input type="submit" value="Enviar">

Followed all of the Craft 3 doc instructions and other help available in the web.

No luck saving a file in entries, from the areaprivada section.

  • 1
    Have you looked in your logs yet? They are located in storage/logs/. Tip: navigate to that logs directory in your Craft project in Finder or Explorer or whatever and delete any existing log files. Then try to submit your form again. Then the log files should only be pertinent to your current issue. – Steven Thate Apr 18 '19 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.