Generate urls for video,audio and image files in django -


i developing website user can upload pictures,audios , videos.all users can see files uploaded other users.now don't want user download files uploaded other users.how can securely display files on webpage without allowing user download files?

i suggest managing media request through view.

@login_required def getmedia(request, media_id):     media = get_object_or_404(media, pk=media_id)     if media.owner != request.user:         #handle user not owning media         httpresposeredirect("/404")     # handle users owning media 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -