Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Prevent Downloading files

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi to all,

i am creating one online tutorial portal using jsp and servlets in the MVC pattern.I have the voice file repository in which user can ear the voice files(wav,mp3) randomly and attend the test.The problem is when i open the browser the other parties software like download manger which downloads the voice file ,is there any way to prevent downloading or encrypt the source of the audio files.

thanks in advance
 
author & internet detective
Posts: 41945
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gopi,
Welcome to JavaRanch!

What happens when the browser sees an audio file is dependent on the user's configuration. There is nothing you can do on the server to force it to open inline if the user is set up that way.

If you don't need the audio to launch in a new file, you can embed it in the page though. This is how flash ads play sound and nested video stays on the page.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that you might be able to set up all audio file URLs so that they point to a servlet, rather than a file in the server public file hierarchy. That way you can verify each request and prevent someone grabbing the files directly.

Bill
 
gopi thulasidoss
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with pleasure Jeeane,William


thanks for your suggestion...

My root url part is like that

http://localhost:8080/omtt/

in the jsp part

<embed src="Sounds/voice.mp3" > </embed>

The thing is my url part becomes like http://localhost:8080/omtt/Sounds/voice.mp3

i need to map the url part to prevent download, is there any encryption techniques....

The audience could able to ear but not to download ?
[ March 13, 2008: Message edited by: gopi thulasidoss ]
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apparently "Sounds" is the name of your publicly addressable directory.

Suppose you had a servlet mapped to "Sounds" - when it gets the request it can look at the remainder of the URI to get the desired file, which can be read from a non-public directory. Before serving the sound file, it could examine the user's session to determine if this person is authorized to get that file at this time.

Probably the user could still get the file from the browser temporary file storage but it would be harder.

Bill
 
What is that? Is that a mongol hoarde? Can we fend them off with this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic