cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Image Upload to MIME Repository

Former Member
0 Kudos

Hi,

I have a requirement where I need to upload images from a web server into MIME Repository and display it in Frontend (WDA). I have tried to use the class CL_MIME_REPOSITORY_API, but without success. Could you please help me out on this? Thanks

Regards,

Nonconformist Pagal

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

hi,

Use this code :

data: mime_repository type ref to if_mr_api,

content type xstring.

mime_repository = cl_mime_repository_api=>get_api( ).

call method mime_repository->put( exporting i_url = 'SAP/BC/BSP/SAP/WEB_UTILITY' i_content = content ).

Whatever content is there Content will be passed to Mime Repository.

Former Member
0 Kudos

Hi Saurav,

I did try to use it, but then if we have to upload the image from say a URL : http://hof.povray.org/images/bigthumb/VillarceauCircles-CSG.jpg.

What would be different in the code? Thanks for your reply.

Regards,

Nonconformist Pagal

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

The MIME repostory APIs won't help you with the upload of the image. They only accept the image as a bianry string. It is your responsibility to upload the image. If the image is on a remote URL, then you would have to use the CL_HTTP_CLIENT class for ABAP to act as a web browser and request the content from the remote URL.