0

Ok, this one has me stumped.

Running EE 5.3.2

I'm using the Guests membergroup to post entries via front-end {exp:channel:form ...} syntax.

So one of the form fields is a file upload field, and it triggers this error message when a "guest" without an EE session/account tried to upload a file. But without using the file-upload, the form and all functions it needs to do works fine. It's only the file-upload field that causes this issue.

image_upload: You do not have access to the directory specified for this field.

Here's what i can confirm.

  1. server side
    • all permissions and paths are correct
  2. Upload Prefs
    • Guests doesnt show up in "Allowed Member groups" and i cant get it to show up either.
  3. Member Group ( Guests )
    • membergroup does not have cpanel access
    • tried giving cpanel access + create entries + access file manager + new files - didn't work, and still did not show up in the list "Allowed member groups" for upload preferences.
  4. Channel Settings
    • Default authors set to member of "Guests" membergroup.
    • Allow guests submissions? setting checked ON/Yes
  5. Channel Field
    • Type: File
    • Allowed FileTypes: All
    • Allowed Directory: let's call it X which throws the error above

The code ( abstracted out for clarity ) that's used in the front-end form is:

{exp:channel:form 
    channel="channel_x" 
    return="/channel_x/confirm/ENTRY_ID" 
    include_jquery="no" 
    include_assets="no" 
    unique_url_title="yes"
    logged_out_member_id="153"
}
<div class="form-block">
    <label for="image_upload">Upload Image or PDF</label>
    {!--field:image_upload--}
    <input type="hidden" name="image_upload_directory" value="75" />
    <input type="file" name="image_upload" value="" data-content-type="all" data-directory="75"  />
    <p class="monospace-gray-xsmall">One file upload per event</p>
</div>

{/exp:channel:form}

So at this point im completely at a loss.

Any help would be much appreciated. Thanks in advance!

1 Answer 1

0

AFAIK for a guest to upload a file you need to set a logged_out_member_id=.

More generally allowing guests to upload stuff to your server is possibly a recipe for much spam / dodgy file transactions... I hope you have lots of storage ... :)

HTH

2
  • Hmmm, i added the logged_out_member_id="###" the ID being the member of the account within the Guests group. Still getting that error. As for spam, no need to worry, the form is behind non-ee authentication.
    – ipixel
    Mar 1 at 19:31
  • I'm obviously not familiar with how your setup is configured, but it might be worth checking that the 'Guests' member group has permissions to upload files etc... Mar 1 at 23:50

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.