Results 1 to 9 of 9
  1. #1
    tarzan1234 is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default How to hide Download Link

    I have a zip file on my site, e.g. mysite.com/dir/my.zip

    I hope visitors can download the file but don't know the zip file link.

    when Download Manager start`s to download , hide my zip file link so no one can undrestand what is the location of zip file

    my purpose is to protect the zip file from been downloaded without my permision.

  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    without your permision...
    but you may try to generate zip using server side code
    read ZipInputStream (Java 2 Platform SE 5.0)
    and ZipOutputStream (Java 2 Platform SE 5.0)
    in the server side code, you can do some checking of client...


    you can also try to use url rewrite, prevent deep linking, inline linking from other source...
    Last edited by mtyoung; 02-05-2009 at 06:09 AM.

  3. #3
    tarzan1234 is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default

    I mean when the download starts Download manager Shows the exact location address of my file so he/she can share that with other users (unpaid users) so they have the address they can easily access. I need some code to make download manager print something else as address, when the user copy that address he/she can not use that because address is wrong and i want users can not resume download (No resume capability)
    please help me out...

  4. #4
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    you may add session id like string into that link?

    and i still think url rewrite is one of the solutions

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by tarzan1234 View Post
    I mean when the download starts Download manager Shows the exact location address of my file so he/she can share that with other users (unpaid users) so they have the address they can easily access. I need some code to make download manager print something else as address, when the user copy that address he/she can not use that because address is wrong and i want users can not resume download (No resume capability)
    please help me out...
    Simply create a Servlet that does nothing but check the session validity, then sets the content type and content disposition headers, then reads the zip file using FileInputStream and outputs it to the outputstream.

    Couldn't be simpler. You have no need to "hide" the url, when you are not giving direct file access.

    Edit: But how are you going to prevent the user from simply giving "unpaid users" the zipfile directly?

  6. #6
    tarzan1234 is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default

    Can you help me with the coding for fileinput and output Stream ???
    i`ll be tankfull.
    is there any way to make Download manager No Resume Capability ???
    Last edited by tarzan1234; 02-05-2009 at 03:28 PM.

  7. #7
    tarzan1234 is offline Member
    Join Date
    Feb 2009
    Posts
    6
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    Edit: But how are you going to prevent the user from simply giving "unpaid users" the zipfile directly?
    thats why i need to Hide the Directory
    all the downloaded files are Store in the same directory. The paid user can access to directory only for 30 days after that they should pay again if they find out the directory they wont pay any more and access directly there .

  8. #8
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Yes, but once the user has the zipfile, what is to prevent him from propagating it?

    And like I said, then simply don't give them access. Use a servlet.

  9. #9
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Quote Originally Posted by tarzan1234 View Post
    Can you help me with the coding for fileinput and output Stream ???
    i`ll be tankfull.
    is there any way to make Download manager No Resume Capability ???
    Lesson: Basic I/O (The Java™ Tutorials > Essential Classes)

Similar Threads

  1. How to Hide cursor
    By priya in forum Java Software
    Replies: 1
    Last Post: 12-09-2010, 10:39 PM
  2. [SOLVED] how to hide jframes
    By yonghan in forum AWT / Swing
    Replies: 6
    Last Post: 08-10-2009, 05:08 AM
  3. How to download website (Get all link in website)
    By finalmem in forum Advanced Java
    Replies: 0
    Last Post: 11-12-2008, 09:43 AM
  4. How to hide a window of application
    By Jktu in forum AWT / Swing
    Replies: 4
    Last Post: 10-29-2008, 07:53 AM
  5. To hide browser heading
    By priyanka_t in forum JavaServer Pages (JSP) and JSTL
    Replies: 4
    Last Post: 01-09-2008, 08:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •