Hello,
I am trying to implement file upload feature to my test server by following "Uploading files with SmartFoxServer 2X" tutorial.
I want to confirm if there is a way to filter who can request files from Jetty server. For example only loggedin users shall be able to download the file or upto user details like point etc.
Thanx
File Request Limitations
Re: File Request Limitations
Hi,
uploads are only possible if you're a logged in user by default.
As regards downloads it's a bit different. Files are downloaded using HTTP via a url which you provide in form of a link to the user.
Since users don't know how to request a file download it depends on your application logic to provide the link to a download to a certain category of users but no others.
This is pretty simple to implement using the "user privilege" attribute that every User object provides. In other words you can assign different "roles" to different users and then allow some of these to access certain files.
For more details on user privilege management you can take a look here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager
Hope it helps
uploads are only possible if you're a logged in user by default.
As regards downloads it's a bit different. Files are downloaded using HTTP via a url which you provide in form of a link to the user.
Since users don't know how to request a file download it depends on your application logic to provide the link to a download to a certain category of users but no others.
This is pretty simple to implement using the "user privilege" attribute that every User object provides. In other words you can assign different "roles" to different users and then allow some of these to access certain files.
For more details on user privilege management you can take a look here:
http://docs2x.smartfoxserver.com/Advanc ... ge-manager
Hope it helps
Re: File Request Limitations
Thank you for your reply Lapo.
Let me think... Will it be possible to interact with server if i writes my own web aplication?
I mean is it possible to ask user privileges to sfs2 from my own simple asp page and request files with usertoken from game?
By this way i can control privileges strictly and prevent cheating as much possible.
Thank you so much.
Let me think... Will it be possible to interact with server if i writes my own web aplication?
I mean is it possible to ask user privileges to sfs2 from my own simple asp page and request files with usertoken from game?
By this way i can control privileges strictly and prevent cheating as much possible.
Thank you so much.
Who is online
Users browsing this forum: No registered users and 52 guests