By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,397 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,397 IT Pros & Developers. It's quick & easy.

file download

P: n/a
Hi,

I want the MP3 audio files to be able to download by users only. Even I set
the pages validated by session, anyone still can type the download url to
get my files without access of the pages where download URL provided. How
can I do in order to prevent everyone from downloading without a user
account?
Thanks for any idea?

Atse
Jul 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
http://www.aspfaq.com/2276
Same logic

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:wP******************@news02.bloor.is.net.cabl e.rogers.com...
Hi,

I want the MP3 audio files to be able to download by users only. Even I set the pages validated by session, anyone still can type the download url to
get my files without access of the pages where download URL provided. How
can I do in order to prevent everyone from downloading without a user
account?
Thanks for any idea?

Atse

Jul 19 '05 #2

P: n/a
atse wrote on 04 nov 2003 in microsoft.public.inetserver.asp.general:
I want the MP3 audio files to be able to download by users only. Even
I set the pages validated by session, anyone still can type the
download url to get my files without access of the pages where
download URL provided. How can I do in order to prevent everyone from
downloading without a user account?
Thanks for any idea?


1 Use an asp file

if session("hasUserAccount")=false then response.redirect"/404.asp"

2 Then binary send the mp3

Response.AddHeader "Content-Disposition", "attachment; filename=
strFileName
Response.AddHeader "Content-Length", strFileSize
Response.ContentType = "audio/mpeg3"
Response.BinaryWrite objStream.Read
something like that, anyway.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

P: n/a
This is the good way to download.
Since this is mp3 file, how can I make it play without prompting download
once the clients set MS media player available?
Thanks

Atse

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
atse wrote on 04 nov 2003 in microsoft.public.inetserver.asp.general:
I want the MP3 audio files to be able to download by users only. Even
I set the pages validated by session, anyone still can type the
download url to get my files without access of the pages where
download URL provided. How can I do in order to prevent everyone from
downloading without a user account?
Thanks for any idea?


1 Use an asp file

if session("hasUserAccount")=false then response.redirect"/404.asp"

2 Then binary send the mp3

Response.AddHeader "Content-Disposition", "attachment; filename=
strFileName
Response.AddHeader "Content-Length", strFileSize
Response.ContentType = "audio/mpeg3"
Response.BinaryWrite objStream.Read
something like that, anyway.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #4

P: n/a
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3
through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open, and/or
rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let
the user *listen/play* the MP3 file?

: Thanks
:
: Atse

Jul 19 '05 #5

P: n/a

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bo*************@ID-181477.news.uni-berlin.de...
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3 through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open, and/or rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let
the user *listen/play* the MP3 file?
I want the client to play the MP3 online instead of Save As...but I don't
want to use a anchor tab <a href="my.mp3"> in order to prevent from typing
the URL by anonymous to play the audio. Of course, it is hard to avoid from
saving the MP3 in "Internet Temporary Files" after playing.
Any idea?
Thanks

: Thanks
:
: Atse

Jul 19 '05 #6

P: n/a
It's all a client option. Even without a href, I can always change my .mp3
settings to have IE prompt me to download the file. You cannot control
this.

Ray at work

"atse" <du******@yahoo.com> wrote in message
news:Wa********************@news04.bloor.is.net.ca ble.rogers.com...

"Don Verhagen" <ne**@southeast-florida.com> wrote in message
news:bo*************@ID-181477.news.uni-berlin.de...
In news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
atse <du******@yahoo.com> typed:
: This is the good way to download.

: Since this is mp3 file, how can I make it play without prompting
: download once the clients set MS media player available?

You can't, it's *not your computer*, it's the client. If you stream your MP3
through your server software, then the browser's helper application will
play (load) the file being streamed.

However, the method you are using is not streaming the MP3 file exactly,
it's streaming the download file. The user will have to choose open,

and/or
rather than download.
Do you want the client to have the MP3 file saved (not in their Internet
Temporary Files) on their machine after playing or do you just want to let the user *listen/play* the MP3 file?


I want the client to play the MP3 online instead of Save As...but I don't
want to use a anchor tab <a href="my.mp3"> in order to prevent from typing
the URL by anonymous to play the audio. Of course, it is hard to avoid

from saving the MP3 in "Internet Temporary Files" after playing.
Any idea?
Thanks

: Thanks
:
: Atse


Jul 19 '05 #7

P: n/a
In news:Wa********************@news04.bloor.is.net.ca ble.rogers.com,
atse <du******@yahoo.com> typed:
: "Don Verhagen" <ne**@southeast-florida.com> wrote in message
: news:bo*************@ID-181477.news.uni-berlin.de...
:: In
:: news:ol*******************@twister01.bloor.is.net. cable.rogers.com,
:: atse <du******@yahoo.com> typed:
::: This is the good way to download.
::
::: Since this is mp3 file, how can I make it play without prompting
::: download once the clients set MS media player available?
::
:: You can't, it's *not your computer*, it's the client. If you stream
:: your MP3 through your server software, then the browser's helper
:: application will play (load) the file being streamed.
::
:: However, the method you are using is not streaming the MP3 file
:: exactly, it's streaming the download file. The user will have to
:: choose open, and/or rather than download.
::
::
:: Do you want the client to have the MP3 file saved (not in their
:: Internet Temporary Files) on their machine after playing or do you
:: just want to let the user *listen/play* the MP3 file?
:
: I want the client to play the MP3 online instead of Save As...but I
: don't want to use a anchor tab <a href="my.mp3"> in order to prevent
: from typing the URL by anonymous to play the audio. Of course, it is
: hard to avoid from saving the MP3 in "Internet Temporary Files" after
: playing.
: Any idea?

You need to get streaming component on your server, such as from Microsoft.

And example link would be: mms://mydirectory/myfile.mp3
Notices that's it's not the usual "http://" link.

mms:// - microsoft streaming protocol
rtsp:// - Quicktime streaming protocol

or you can use http:// protocol to stream also, look at this link:
http://www.developingwebs.net/html/mp3.php

Don


: Thanks
:
::
::: Thanks
:::
::: Atse
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.