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.

PHP

Adding images to a blog post, but selecting from a server directory?

Hey all, I have built a simple website for a client, using PHP. The website includes a custom built content management system, where the client can add blog posts, users, categories (for the blog post) and a media section where the user can upload images to be used in a blog post.

The problem I have is, how can i have a button on the add post form to be able to browse the server side image upload directory?

any suggestions would help!

1 Answer

Casey Ydenberg
Casey Ydenberg
15,622 Points

Did you find a solution? I think you would have to include the images directory in www, restrict access, and allow an AJAX request from the blog.