Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

REST upload from App works on image, fails on video

$
0
0

Has anyone tried to upload a video via REST to SharePoint 2013 from a SharePoint hosted app?

Below are my two POSTs. The first one, an image, works fine. The second one does add my video but it throws a 404 (Not Found). Subsequent executions do not overwrite but instead create new video files with some random letters afterwards and also shows the error.  I cannot find a way to upload a video into a library without receiving the 404.

My suspicion is that it's because of the way SP2013 handles videos by creating items that don't retain their extension like an image does. Anyone know for sure?

http://app2-6040b7dbcd33cc.sp13apps-qa.PATH/sites/XDevT/CustomNewsFeedEntry/_api/SP.AppContextSite(@TargetSite)/web/lists/getByTitle(@TargetLibrary)/RootFolder/Files/add(url=@TargetFileName,overwrite='true')?@TargetSite=%27http://teamsites13-qa.PATH/sites/XDevT%27&@TargetLibrary=%27NewsFeedVideos%27&@TargetFileName=%27cg-overlay-img.jpg%27

http://app2-6040b7dbcd33cc.sp13apps-qa.PATH/sites/XDevT/CustomNewsFeedEntry/_api/SP.AppContextSite(@TargetSite)/web/lists/getByTitle(@TargetLibrary)/RootFolder/Files/add(url=@TargetFileName,overwrite='true')?@TargetSite=%27http://teamsites13-qa.PATH/sites/XDevT%27&@TargetLibrary=%27NewsFeedVideos%27&@TargetFileName=%27WMV_Movie.wmv%27


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>