Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Downloadable documents on website

I would like to ask for suggestions: I am building a website for my wife for her Math students. She would like to have pdf's of their homework online to download but needs them to only be accessible to her students. I've thought of password protecting each file, or creating a page that can only be accessed with a password.
As of now, I'm not sure which is the best method to achieve this, or putting a password on a file.

Any ideas would be greatly appreciated.

Thanks, Mark C

1 Answer

Ricky Catron
Ricky Catron
13,023 Points

I would recommend simply building a login for the website so only students could create accounts. They could then go in and download whatever they needed.

Most languages have some kind of framework that handles logins for you. If not some quick research into your chosen language should teach you how to create "sessions" and manage logins. Building your own could be valuable experience, plus the loss if someone managed to break in would be minimal, who would want to steal math homework.

Goodluck! --Ricky