4 Force file download in browser Shared by Ben Goshow, Fishhook 3 years ago Web Beginner Today, most modern browsers will open a direct link to a MP3 file and allow you to play it in the window. However, I was looking for a way to allow users to download a file that felt intuitive and easy, without needing to include instructions such as, "Right click on the file link, then select Save As..."After a little digging, I found the following lines in the Rock core file ~/App_Code/GetFile.ashx.cs:bool sendAsAttachment = context.Request.QueryString["attachment"].AsBooleanOrNull() ?? false;context.Response.AddHeader( "content-disposition", string.Format( "{1};filename={0}", fileName.MakeValidFileName(), sendAsAttachment ? "attachment" : "inline" ) );Which means I can simply add a URL query parameter attachment=true to instruct the browser to download the file instead of playing it inline. ie., https://rock.rocksolidchurchdemo.com/GetFile.ashx?guid=[fileguid]&attachment=trueBoom!