Hi everybody,
I am developing a singel home page, authenticated user kan upload audio files and all users (authenticated and not authtenticated) can listen to them.
My problem is when the user clicks on the link (the name of the audio file) gets a window which asks the user if he wants to save or open the file.
what I want to do is when the user clicks on the link it just open the audio file with default media player (realplayer or windows media player or ...) and the user do NOT get the window to save the audio files. (just open and listen not save).
thanks for your help.
I use following code to open the audio files. I use "application/x-unknown" because the files can be .wav, mp3 or .wma or ...
Response.ContentType = "application/x-unknown";
Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + myFile.OriginalName + "\"");
Response.WriteFile(Path.Combine(AppConfiguration.UploadsFolder, myFile.FileUrl));
I am developing a singel home page, authenticated user kan upload audio files and all users (authenticated and not authtenticated) can listen to them.
My problem is when the user clicks on the link (the name of the audio file) gets a window which asks the user if he wants to save or open the file.
what I want to do is when the user clicks on the link it just open the audio file with default media player (realplayer or windows media player or ...) and the user do NOT get the window to save the audio files. (just open and listen not save).
thanks for your help.
I use following code to open the audio files. I use "application/x-unknown" because the files can be .wav, mp3 or .wma or ...
Response.ContentType = "application/x-unknown";
Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + myFile.OriginalName + "\"");
Response.WriteFile(Path.Combine(AppConfiguration.UploadsFolder, myFile.FileUrl));