password protected uploads

7 posts by 3 authors in: Forums > CMS Builder
Last Post: April 27, 2009   (RSS)

By kkegans - April 17, 2009

Dave et al,

I am being ask to provide a site that will display 2 levels of images, one which displays for any user and a second level that are only available to users that can provide an access password. Htaccess security would provide the protection, but is there a way to handle 2 levels of uploads (public and private) and display the public files with generic images for the private files until an access code was entered, then redisplay all of the images if the access code (password) was accepted?

Every user would be able to use the same password, so password management isn't the issue.
CMSB Rocks!
Thanks,
Kurt

Re: [kkegans] password protected uploads

By Perchpole - April 17, 2009

Hi, KKegans -

I'm currently working on a site for a group of photographers. They required a similar set-up to the one you've outlined - but with categories thrown in for good measure! I think I've managed to pull it off with a mechanism which is both simple and elegant.

Once the site is open I'll share it with you.

:0)

Perch

Re: [kkegans] password protected uploads

By ross - April 20, 2009

Hi there.

Thanks for posting!

To get your images uploading to different folders, you'll want to setup one upload field for the public images and a second upload field for the private ones.

You can have each of those fields upload to different places.

Does that sound like it would work? Let me know what you think ;).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [kkegans] password protected uploads

By ross - April 21, 2009

Hi

Because the upload fields are both in the same section, you can access them both on the same page no problem. There would be two separate bits of code to make them all appear but that isn't a problem.

Have you worked with the code that makes images appear before?

That's the same code as you'll use this time. There will just be two bits of it (one for each field).

There isn't really a query per say for this one.

Let me know if that makes sense. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] password protected uploads

By kkegans - April 26, 2009 - edited: April 26, 2009

Ross,

I set up a second upload using a custom path to a Webprotected directory. Followed the same file structure as the upload directory and uploaded a file to the protected images upload. When uploading to the protected directory I was prompted for the access Username and Password for the Webprotected directory.

Next, I created a new Detail Viewer for the record and all of the images displayed, those from the upload directory and those from the private directory and no username and password was prompted for.

Did I miss something, or is the CMS Builder code just going to bypass the login for the protected directory? If that is the case, this will not work.
CMSB Rocks!
Thanks,
Kurt

Re: [kkegans] password protected uploads

By ross - April 27, 2009

Hi there.

Thanks for the update!

The password protected folder stuff should actually be happening before the CMS Builder stuff gets a chance to so CMS Builder doesn't have the ability to by pass that.

What I suspect has happened is your web browsers remembered you logged in already and save that in a cookie so it doesn't keep asking over and over again.

Could you try loading that test page in a different browser or on a different computer? Or even just clear your cache.

Let me know how you make out with that. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/