WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
disable file deleting in the server? (7 posts)

  1. anabelle
    Member
    Posted 4 years ago #

    How can I disable file deleting in the server?

    I want the users to be able to upload files, up to 100MB but offcourse that kind of file can’t be recieved via e-mail.

    How can I keep a copy in the server and recieve a link to the file instead or something like that?

    Thanks!

  2. dilneiss
    Member
    Posted 3 years ago #

    i want to do the same!
    how??

  3. webjunk
    Member
    Posted 3 years ago #

    I would NEVER recommend doing it. Could be very dangerous in several ways.
    But if you must, look in controller.php. You will I believe need to take out (in two places) the section like:

    // remove upload files
    		foreach ( (array) $wpcf7_contact_form->uploaded_files as $name => $path ) {
    			@unlink( $path );
    		}

    AT YOUR OWN RISK!

  4. anabelle
    Member
    Posted 3 years ago #

    No safe way of doing it?

  5. webjunk
    Member
    Posted 3 years ago #

    No safe way? You mean to allow unlimited uploading of files?

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    It's dangerous as webjunk wrote.

  7. webjunk
    Member
    Posted 3 years ago #

    You are allowing anonymous Uploads.
    Unless you do some extensive coding, you are allowing unlimited uploads. THink what a script could do.
    The file can be called anything but still have dangerous code it in.
    This is just a start. I don't like the idea of even files being sent by email but understand it can have uses. But leaving files from unknown sources on your website you have spent so much time creating???

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic