Uploading Video to video Library using SharePoint2013 Rest APIs - rest

I am using SharePoint RestAPIs to upload video to Video Library using the following urls and the video is uploaded successfully:
1._api/web/lists/getbytitle('Video Library')/rootfolder/Files/add(url='a.mp4')
2._api/web/GetFolderByServerRelativeUrl('/Video Library')/Files/add(url='a.mp4')
The issue is that the AJAX calling are return in the error method(file not found) not in the success method and I want to use the file url after uploading
Note the following:
1.when you upload a video to video library SharePoint create a folder with the name of the uploaded video file name and put the video file inside it.
2.If you already uploaded a file with the same name SharePoint create the folder with random name and put the video inside it.

Related

Is it possible to provide a URL that returns an m3u8 file to azure media player?

I'm using azure media player to play AES encrypted videos on my website. However, I don't want to use the default HLS streaming uri that comes back.
What I'm doing is loading the m3u8 from the HLS endpoint and adding captions to it directly (Since I can't find a way to add captions through media services itself, if there is one, I'd be all ears). So the url looks something like this: https://website.com/getvideo/100000
This url returns a valid m3u8 file and I can get it playing in other players (unencrypted).
My question is this: Is there a way to get azure media player to recognize this url as a valid return of an m3u8 file? Currently it's not even trying to hit my endpoint and I suspect it's because it's looking for something in the url.
Let me know if you need more information.

Using Parse REST API to link an uploaded image to a parse object, getting access denied when accessing image

I'm using the sample code provided in the REST API docs for uploading an image (my own) and then assigning it to an object in an image table. Image uploads fine, code for associating the image runs fine, and a record is created in the DB.
However, if I try to access the image from the data browser, I get ACCESS DENIED. Why is this so? The image is retrievable via the URL provided after a successful upload, but doesn't appear anywhere in the Parse web UI (should it be ihe Files section of Cloud Code?).
Any input would be helpful. I am working on a few wrinkles to get it working.
The answer to this question is to use the long filename provided in the image upload confirm, and not the short filename example shown in the docs.

CodeIgniter video files not uploading on web server

I have created a codeigniter application with a file upload feature. This is loaded as my Facebook app in a Canvas page. I have set my allowed types as png,jpg, mp4.
When tested on localhost this works fine and uploads well.
However, when uploaded on my server and installed as my canvas app, when I access my page via apps.facebook.com/myapp, the images are uploaded fine, BUT, when I try to upload a mp4 file, thatwas successfully uploaded on localhost version, it returns the upload error "The filetype you are attempting to upload is not allowed.".
But I have set it as an allowed type.
I tried uploading via the canvas url (www.myapps.com/apps) rather than the canvas page (apps.facebook.com/myapp), but it gives the same problem, it says the type is not allowed.
I thought it might be server not configured so I add AddType video/mp4 .mp4 to the server's and app folder's .htaccess.
Also I made sure that mp4 is added in the mime.php in my codeigniter app.
Just not sure what to do again. It keeps saying it's not allowed, but it is.
Any help would be great. How do I fix this?
Try adding the both mime types in the list in the config folder for codeigniter. Like this.
'mp4' => array('video/mp4', 'application/octet-stream')

filepicker.io - on .pick / pickAndStore use generated thumbnail

When the file picker is opened either using .pick or .pickAndStore, and an image is selected, a thumbnail of the original image is shown on the side.
I want to reuse that thumbnail, preferably from the already locally stored version. How can I access it e.g., with the filepicker API or other javascript library?
The thumbnail you see during uploading is generated by FilePicker javascript as a data URI (eg, src="data:image/jpeg;base64,...") it never really exists.
Once the file is uploaded you can use the image conversion rest API:
https://developers.inkfilepicker.com/docs/web/#inkblob-images

Can I import or upload an audio file to soundcloud via the api using a URL vs. file data?

I'm trying to upload/import a track to soundcloud via their api.
Right now, it looks like you can only upload an audio file, but you can only do it by POSTing the file data.
My question is, is it possible to import to soundcloud (through the api) from a URL?
sort of like they do here: http://importer.soundcloudlabs.com
but via the soundcloud api.
Any ideas? I don't really want to make this a 2 legged process (download audio file, then upload file data to soundcloud)
Thanks!
I don't think this is possible. On the importer, you'll probably find that behind the scenes, it's doing that two-step itself. User inputs url, back end server downloads file, then uploads to SoundCloud API.