Image upload does not work with MB Frontend Submission

Support MB Frontend Submission Image upload does not work with MB Frontend Submission

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6550
    ludovic.meyerludovic.meyer
    Participant

    Hello,

    I use an image_upload in front but the loader keeps turning and the image never show.
    Looking a xhr request, i get an "Access denied" response

    
    array(
        'name'    => __( 'Poids max : 2Mo ; 72dpi ; Format min : 350×220px', 'vm' ),
        'id'      => 'vm_image',
        'type'    => 'image_upload',
        'max_clone' => 1,
        'max_file_size' => '2mb',
        'force_delete' => true,
    ),
    

    I tried other fields with no success.
    Do you have a solution ?

    Regards,

    #6560
    Anh TranAnh Tran
    Keymaster

    Hi,

    The problem with image upload in the frontend is permission. Users need to login and have the upload_files capability. WP doesn't allow anonymous user to browse the media library and upload there.

    So, I'd suggest you use the simple image field, which allows uploading images, or you need to add more capabilities to allow users to upload (users still need to login though).

    #6600
    ludovic.meyerludovic.meyer
    Participant

    Hi,

    My users are logged in as they are "subscribers".
    I already set the upload_files capability via Advanced Access Manager before open the topic but the problem still remains.

    var_dump(current_user_can( 'upload_files' )); returns bool(true) but they can't upload files.

    I also tried the simple image field with the same result (images are not uploaded).

    An idea ?

    #6606
    ludovic.meyerludovic.meyer
    Participant

    You are right : simple image field works (but image_upload not, even with upload_files capability). But my field is in a group and it does not work.

    Please see : https://support.metabox.io/topic/fileimage-input-field-does-not-work-when-in-group/

    #6641
    Truong GiangTruong Giang
    Participant

    We will discuss in the topic: https://support.metabox.io/topic/fileimage-input-field-does-not-work-when-in-group/

    I'll close this topic.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Image upload does not work with MB Frontend Submission’ is closed to new replies.