Forum Discussion

shravani's avatar
8 years ago

API to fetch all the images which are uploaded by the users including users that are not having...

Do we have any API to fetch all the images which are uploaded by the users including users that are not having upload image permission through Admin? Such users (not having upload permission) are able to provide image URL and these images are visible in OOTB components.We have a custom component in which we need to show all the images uploaded including the ones that he/she can upload using URL too. Hence we need such API which retrieves all the images uploaded by the user.

 

Regards,

shravani

8 Replies

  • satya's avatar
    satya
    Expert
    8 years ago

    Hi shravani,

     

    Hope this might helps you

     

    /restapi/vc/users/id/[id]/uploads/images

    Here  is the documentation link for your reference.

     

    Thanks,

    Srujana Satya 

     

     

  • shravani's avatar
    shravani
    Guide
    8 years ago

    Hi satya and VikasB,

    I do not need user specific images but the images which are posted throughout the community.

    I have tried this api call "/uploads/images". But this api does not return the images which are uploaded by the users who does not have the permission to upload an image.

  • VikasB's avatar
    VikasB
    Boss
    8 years ago

    Hi shravani The users do not have upload permission are using the image URL to show the image instead of uploading it. Such images are not uploaded in the community so you can not get them using the API. 

  • Hi shravani,

     

    Can you be more specific as to where the users are able to provide image URL? Is it in the Rich Text Editor, profile page (Add Image) or else where?

     

    Thanks,

    Srujana.

  • shravani's avatar
    shravani
    Guide
    8 years ago

    Hi srujanayeruvaka,

    The user is uploading it in Rich Text Editor even though he does not have any permission and these images are visible in OOTB components. I need an API which will give me these images as well.

  • srujanayeruvaka's avatar
    srujanayeruvaka
    Champion
    8 years ago

    shravani - I believe there is no API to retrieve such externally hosted images (to the best of my knowledge). You may have to get the list of all messages posted by the user and parse each message body to fetch the image URL.

     

    I would still wait to hear for a better/correct answer to your query from the other more knowledgeable members of this community! :)

     

    Thanks,

    Srujana.