Hello,

I searched and could not find an answer, but is there a way to add captcha so spambots cannot just upload a bunch of files.

Thanks!

Comments

quicksketch’s picture

See CAPTCHA or Mollom.

ndstate’s picture

Hello,

I have captcha installed, but I am trying to figure out what "form_id" filefield uses or how I can enable captcha on filefield for anonymous users?

Thanks!

quicksketch’s picture

Enable the option in captcha module to show the "Add captcha here" at the bottom of all forms in Drupal. Then go to the form and click "Add captcha here". I'm not 100% certain on what the actual option is called, but it should be located at admin/settings/captcha. Alternatively just look at the source of the page and look for the hidden element in the form with the name="form_id" property and use whatever its value property is.

ndstate’s picture

The add captcha here does not work on these types of fields (at least on my install). I have tried inspecting the upload button, but it does not return a value that works with captcha. I am trying to make them use captcha before they upload a file.. I have ajax enabled if it matters.

For an example head to http://www.campusdakota.com/platino_demo/node/add/calendarevent
If you go down to the Photo heading, you can choose a file and upload before being required to use captcha. This is no good for me since spam bots could upload all sorts of stuff.

Thanks! :)

quicksketch’s picture

You can't add the captcha to the upload field specifically, you can only add it to the entire form. However if the form is never saved, the files are never put into a permanent state and will automatically be removed after 6 hours on cron jobs. In case you haven't figured it out already, the form ID for that form will be node_form_calendarevent.

ndstate’s picture

Ok, so if they are removed after a cron than that should be an ok option, but it would be nice if captcha could be added to that field. They are put in a permanent state after the form is submitted? That should work ok.

Would disabling ajax help or does the upload option not use ajax?

Thank you for your help.

quicksketch’s picture

Disabling AJAX might work... I'm not sure if the Captcha validation fires if the upload button is clicked. I suppose you could just turn off JavaScript in your browser and see if you can still upload without filling out the Captcha. My feeling is that it should be allowed, but I'm not sure.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after a lack of activity.