Architecture for mobile video uploads - ios

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.

Related

PHP server-side YouTube V3 OAuth API video upload for different users

Currently I am using a modified script to upload videos. I have taken the following example as a basis:
https://github.com/youtube/api-samples/blob/master/php/resumable_upload.php
This script uses browser based oauth flow.
Could you please tell me if it is possible to allow other users to upload videos to my channel without making them the channel managers? So that they could use my auth token.
If yes - how can it be inplemented?
Yes, that is definitely possible. You need to design an application that is capable of the following:
Authenticate the channel the videos shall be uploaded to via OAuth. As DalmTo said, you need to save the tokens. Whoever has the tokens has access to the channel.
Since your application has access to the channel by now, it (and therefore you) can decide what to upload. That means that you are responsible for granting or denying a specific user the right to upload something.
In order to do so, you could again use OAuth or any other method you like (e.g. you can use your backend accounts).
In other words, a user has to identify towards your application. Your application can then decide to take the user's content and upload it to the channel.

What is the most efficient way to create end-points for an Amazon SNS service?

I am using Amazon SNS Service for an iOS application that needs push notifications.
I have figured most of the things, except for the part where I have to register my device tokens.
This is where Amazon talks about it. It can be done manually or with the help of createPlatformEndpoint API which they obviously recommend for bulk uploads. My question is how we can directly register tokens from devices that will install the app later on. The documentation talks about a proxy server which I would want to avoid as of now. Isn't there a direct way of doing this, like where I can directly call a method and push the device token received in the application to my SNS Platform?
This, is a possible duplicate except that it is in reference to Android.
The AWS Mobile SDKs support accessing SNS directly from the mobile device. If you're interested in seeing code demonstrating this on iOS, we included some as a sample we prepared for re:Invent 2013 called Mobile Photo Share.
The important thing to note when accessing SNS directly from the mobile device is that you'll want to restrict the credentials delivered to the device to only those services and resources you'll need to access. You can accomplish this via web identity federation or a token vending machine with appropriately restricted policy.
If you want to learn more about the Mobile Photo Share app, we had two talks at re:Invent about the app and its architecture. The video and slides for those talks are available here:
Building Cloud-Backed Mobile Apps
Integrating Social Login Into Mobile Apps

Enterprise iOS app cloud storage

I'm trying hard to get my mind wrapped around how you would be able to store files in the cloud from an enterprise app without requesting the user to log in.
The background:
I'm developing an iOS app that will be distributed to certain employees in our company. As of today we already have an app that uses an FTP server to upload user created files. In this new app, I would like to skip the FTP server and instead use some sort of cloud storage (DropBox, Google Drive etc.)
The users will upload some files (around 1-2 uploads per day) to the cloud service, and people at our HQ will be able to look at these files.
I don't want to have each employee create a personal cloud drive account that would be linked with a "master" account. Rather, I want this specific application to always upload it's files to the cloud storage "master" account. Is this even possible?
Since only our employees have access to the app, I don't see the security factor as limiting. The information sent is not of use to anyone else than our company (no high-security stuff).
Is it possible to "hard-code" an OAuth token that corresponds with a certain account that the app always uses? Are there other possibilities that I'm not aware of (other than FTP or cloud storage)?
Any help will be appreciated.
Regards,
Jens Nilsson
how about use one dropbox account and hard code it in your app? then your enterprise user can upload their files respectively. surely you need do some trick to make no any file with duplicate name.
i am developing one iOs application that uses a parse cloud service to upload user generated files.
in that parse service, user dont need to create a account separately.each and every user can be able to uploads files to cloud where user can be able to visit all the files which is in the cloud which is created by some other user.
suppose if we want limit some user files accessibility or upload files privilege also we can achieve that through using the parse.
i just remember parse is not open source.

Generating S3 bucket url for RestKit without using aws

I have an app using RestKit successfully. I am building an IAP in the app and for iOS5 I needed a place to host the app files for the IAP. I decided using Amazon S3 for that.
Now I now that I can integrate amazon API but I wish to keep my app simple, and since I am using RestKit I just want to use it to download the files.
Is there a guide or explanation on how to generate a bucket url with expiration and secrets ?
Thanks
Shani
Sure: all the information you need is in the Authenticating REST Requests documentation page.
Also, it's not entirely clear from your question, but I hope you're putting the URL generation in some web app somewhere that you control, rather than directly embedding it in the IOS app. I also hope you're using IAM to restrict that key to the appropriate permissions level regardless.

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