Support » Plugin: Contact Form 7 » [Plugin: Contact Form 7] File upload – error 403

  • Resolved spooky_jack


    I’m using contact form 7, v. 3.2. I have an application of the form where I’m uploading pictures in my standard upload directory and keep them there. The user needs to be able to view those pictures at their current position: I mean that if they’re uploaded on, when in a browser the user puts the link, he must be able to see the photo.

    However, even if the pictures are uploaded correctly (and attached correctly) and still exist on the uploads folder, and both the pictures and the uploads file have full permissions, when the user tries to view them via a browser, a 403-forbidden message comes up. This wasn’t the case with this folder before uploading anything from contact form 7. I’m guessing that I’m not allowed to browse directories but I’m not sure how to fix this. Any suggestions?

Viewing 1 replies (of 1 total)
  • Ok, after struggling for a day, I figured it out
    On modules/file.php there’s this code:
    $htaccess_file = trailingslashit( $dir ) . '.htaccess';
    if ( file_exists( $htaccess_file ) )

    if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
    fwrite( $handle, "Deny from all\n");
    fclose( $handle );
    I had commented it, but, the .htaccess file was already created the first time I used the form as was originally. So, by deleting the .htaccess file, everything worked as required 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] File upload – error 403’ is closed to new replies.