Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Guru Prasad 11 posts 80 karma points
    Jul 13, 2016 @ 04:55
    Guru Prasad
    0

    Umbraco REST API - Media End Point not working

    Umbraco Version - 7.3.4 We wanted to use Umbraco Rest API's for our project and while exploring we came across few issues.

    We could able to do GET, PUT, POST for content. But for Media endpoint, we are not able to save the image.

    So, we modified Umbraco rest API project for POST under Media endpoint to save the image. Below are the observations

    1. We were able to send the media byte array and reading the same in the Umbraco Post method
    2. After we read, we were using IMedia.SetValue which takes 3 parameters - "umbracoFile", Filename, Stream
    3. These are all working.
    4. once the code reaches MediaService.Save we are getting - "startIndex cannot be larger than length of string"
    5. Blog posts suggest to pass the filename with extension and we tried the approach as well. But no luck

    Appreciate your help in any solution for the same

Please Sign in or register to post replies

Write your reply to:

Draft