Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Store video and permit certain signed-in users to access it, but deny others

Hi!

I am developing an app. I have created sign-up and sign-in services which are working fine.

1) Where can I store some videos that can be assessed through the video control?

2) When a user signs in, I need him to be directed to a page which contains a video screen. When he clicks on the video screen, any video which he has the permission to view should start playing. How do I grant permission to certain signed-in users to view a video but not others?.
For example,
User_1 can view Video_12, but cannot view other videos.
User_2 can view Video_5, but cannot view other videos (you get the point)?

Please, give me a sense of how to approach the above 2 challenges.

Thank you.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Store video and permit certain signed-in users to access it, but deny others

Hi,

You can store video in Database: http://docs.appery.io/tutorials/uploa...
There are no access settings for a database file. Please create a database collection where you can store a file URL and a flag field showing if you can read being unregistered.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Store video and permit certain signed-in users to access it, but deny others

The tutorial which Katya referred me to above deals with image files. It does not work for retrieving uploaded video files.

  • What request and response parameters can I use to retrieve a video file from the database?

  • How do I map these parameters?

    Thanks.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Store video and permit certain signed-in users to access it, but deny others

Hi Alena,

I already tried retrieving it that way but it did not work. I suspect that my mapping may be faulty. I entered the database_id manually in the request.

For the session token, I mapped it from local storage to the request. Is there a problem with this?

Also let me know what to map in the response.

Thank you.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Store video and permit certain signed-in users to access it, but deny others

Is your project shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a?
Please share, tell its name and where to see the problem.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Store video and permit certain signed-in users to access it, but deny others

It is shared. App name is Cons-1. I created a REST service called user_video. I am trying to invoke it by clicking on the video screen on the startScreen page.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Store video and permit certain signed-in users to access it, but deny others

What video type do you use? Please specify it in Service setting, now you have only file name.

Doz
Posts: 0
Joined: Sun Oct 27, 2013 9:01 am

Store video and permit certain signed-in users to access it, but deny others

It is mp4. Currently, I have changed the video file to another one which has the extension .mp4. When I open the test page, I can hear the video playing but I cannot see anything. I need the video to play in the video window. How do I achieve this? Also, why does it start to play automatically even though I invoked the service on video icon click?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Store video and permit certain signed-in users to access it, but deny others

Hi,

Your file "JavaScript1" doesn't contain JavaSrcipt, but contains HTML code. This is incorrect. Please delete it.

Return to “Issues”