I 开发者_JAVA百科have been roped in to help design a website for a local charity. I am currently a university student that has experience designing sites to good effect (Within university). I am comfortable using the relevant languages and packages. What I am not so sure about is hosting.
If I have a site that has a newsletter, for example. If I wanted the user to be able to download that newsletter, would I simply have that file uploaded somewhere on the hosting server and simply provide a link to that file?
Thanks
Yes. Although you might also wish to use a Content-Disposition HTTP header to ensure that the file gets saved rather than opened in the default application for whatever file type it uses.
Yeah, that's really all you have to do. The only thing is if its a file that the users browser will attempt to open then you need to force the download like David said, this would be the case for a pdf file, such as a newsletter like you said. And yes, to answer your other question, all hosting providers will support downloads like this.
精彩评论