BuddyDev

Search

Set default wordpress upload dir for Xprofile Custom Field Type

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on #47793

    Hello great team 🙂

    In the plugin BuddyPress Xprofile Custom Field Types i am using the image upload field.
    The image is getting uploaded in the folder bpxcftr-profile-uploads.

    Would it be possible for the image to be uploaded in the default wordpress uploads dir with the along thumbnails creation (so that i can manage it from the default wordpress media library) ?

    Could i use some filter or hook for this?

    Thank you very much in advance.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #47798

    Hi,
    Thank you for the question.

    At the moment, we are using “wp_handle_upload” to upload file. This does not create any entry as attachment and that’s why you don’t see that in the Media library in WordPress.

    In order to do that, you will need to store media uploads as attachment.
    Though you can always change the directory path using ‘upload_dir’ filter, I will suggest against it for now. I will put a filter in next release to allow you change the base directory.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 71
    Lefteris on #47806

    Hello Brajesh,

    Thank you so much for your always kind help.
    This is what i was also thinking. A filter would be good.
    But still i am not so sure how i can create the entry after.

    When you will push the update could you please help me with the attachment entry?

    Thank you

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #47822

    Hi,
    Thank you.
    I will be adding a filter.

    For the entry part, your best solution is to create a new field type(attachment field type).

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved