Multiple file_upload fields

Support MB User Meta Multiple file_upload fieldsResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6736
    woorisewoorise
    Participant

    I am using two different upload fields (type: "file_upload").

    On file upload is possible to know which one is used so I can change the upload folder path?

    #6764
    Anh TranAnh Tran
    Keymaster

    Can I ask how do you change upload folder? Do you use WordPress hooks?

    #6768
    woorisewoorise
    Participant

    Yes I am using upload_dir filter.

    #6772
    Anh TranAnh Tran
    Keymaster

    I'm afraid this is a hard problem. As the file_upload uses Media Library to upload files, all it does is calling the popup, passing the required parameters for the uploader (mime types, file size, etc.) and parsing the returned data. I've just checked the code and couldn't find anything related to the current field, because the uploader doesn't need that. But can you try print_r everything global ($_POST, $_GET, etc.) when filtering? Probably I'm missing something.

    #6774
    woorisewoorise
    Participant

    I did it but I didn't get any information that I could use.

    For now I am checking external conditions like user role, post taxonomies etc. but it would be useful if there was a more direct way related to the field.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.