Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Mark Cabangon
Mark Cabangon
3,301 Points

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