Uploading files to Sharepoint 2010 Picture Library - ios

I am creating a iphone app that connects to a sharepoint site to download and upload images.
i can download images by using sharepoint's listdata.svc with GET request and querying the site to retrieve the url of the image that i want.
https://xx.xxx.xx/sites/XXX-XXX/xxxx/TestLibrary/1/Picture%20Library/test.jpg
Question is how do i upload a file using HTTP PUT request?

Use _vti_bin/copy.asmx web-service

Related

How to get around Tumblr returning it's images embedded in a webpage to a 3rd party service

Ran into this issue and wanted to share my solution.
I am writing a script that gets images from a Tumblr blog and texts them to me. I was using a web scraper but switched to Tumblr's api, both of which got me the same images hosted on 64.media.tumblr.com. I ran into an issue when trying to use Twilio to send the images because Twilio wasn't getting an image from the url I provided, instead it got a webpage with the image embedded in it. Here is an example image - I find that sometimes it'll initially open as an image, but on refresh I get the webpage. I contemplated converting the image into a base 64 data url, but Twilio wouldn't accept that.
Tl;dr
Upload the image to a free image hosting site like Imgur (here's the API, you can just supply the source image url) then use the url from that site.
My Findings
Through some experimentation I found that I would get the image response when requesting with Axios and Postman, but get the webpage when requesting with Chrome and Puppeteer. This lead me to believe that Tumblr is attempting to only return the webpage to browsers, possibly a User Agent check. Whatever method Twilio is using to request images is triggering Tumblr to send the webpage back. If we can get the image hosted on another site that doesn't do embedding, we can solve our problem. Luckily Imgur exists and has a nice api we can use to upload anonymous images. Twilio happily accepted the Imgur image urls.

ASP.NET Web API - Handling media file authorization

I have a mobile app with talks to backed api implemented in asp.net web api. User can post pictures from app, which I am saving in my content directory. Now user can also request the same url from app and its served to user directly from IIS.
What i want to make sure is only user who uploaded the picture should be able to fetch it. Any other user should receive 404.
Is there a way I can handle this using web api? I dont want to read file in controller and serve as base64 because this is not efficient way. I want to continue serve picture from content directory via IIS and apply authorization on top of it.
has anyone came across this problem?

Architecture for mobile video uploads

I have an mobile application (native iOS) and I want to provide the user the ability to upload videos and associate them to their account.
Some considerations:
I have a Node.js API running on Heroku that I use to maintain the DB.
Videos on will be stored on S3
I am looking for some suggestions on how to architect this. Here is my sequence of events I am thinking...
The app POSTs to the API to create the "event" and receives back an S3 path
The mobile app uploads the video to the S3 path it received in step 1 response.
Upon successful upload the mobile app makes a PUT to update the API that the upload was successful.
I am curious how others have approached this problem.
Your example will work fine.
You can probably get rid of the first POST request to the API and offload the responsibility of dealing with S3 to your client app.
The opposite can also work -- you can have the API deal with uploading, so that you upload your file to the API and then it will store it in S3. This could be beneficial in situations where you have multiple client apps on different platforms and you want to offload all that work to the API instead of each client having to implement it.

Upload video to youtube from tizen

I'm trying to upload video form tizen to the youtube account. I'm getting an error saying "No file found in request". Any suggestions to implement this?
I'm following the procedure from here. I completed till 3. Video's from my desktop is uploaded properly. But the same is not working with device.
I don't know whether you're performing the upload from the context of a web browser or as an application that's just making HTTP requests. (I'm not familiar with the Tizen platform.)
If you're just writing an application that makes HTTP requests, then don't try to replicate the browser-based upload flow from your app. Instead, you could use the direct upload or resumable upload flows.
If you're writing a web application and it's failing in the Tizen browser and working on a desktop browser, then that sounds like a bug in the Tizen browser.

Usage of aws ios sdk for iphone app

We are in the development of an iOS(iPhone) application that consumes a web services. We are planning to host our web service (ReSTful web services) in the AWS. Initially we planned to use Restkit or ASIHttpRequest libraries for invoking the web services. Our web services contains GET, POST api and some image uploading for setting the profile photos of the users. Also we are sending video, audio files in to the database and accessing these files through web services. We are using JSON as our output format.
While searching through the web we found that AWS SDK for iOS is this. Can somebody advice us is it possible to do the above requirements (GET/POST/Upload Photo/etc) using AWS SDK for iOS? Or shall we continue with other third-party libraries like Restkit or ASIHttpRequest.
Please advise us.
You can use both ASIHttpRequest and Amazon SDK for IOS at the same time.You would want to use Amazon S3 service (by creating a bucket) for your media files.Amazon S3 is cheap,fast and easy to use. When you download AWS SDK you can see sample folder and an example of S3_Uploader for ios.
For example in my latest app user upload their photos to Amazon S3 and comment&vote to other user pictures etc... I use AWS SDK to upload pictures to the Amazon S3 service. While uploading photos with AWS SDK I keep URL,path, of the photos in a database and use ASIHttpRequest , POSTto update my MYSQL database, which is in another server. When I fetch data from my server I use JSON and AWS SDK.
So If I were you, I would use Amazon S3 for my files(photo,video etc...) and I would use either Amazon EC2 or another web service for rest of the database. I am assuming you keep your data in a database and interact thru GET and POST methods. If so keeping media files and database in separate places would be my choice

Resources