WordPress.org

Forums

Contact Form 7
File upload name (4 posts)

  1. Belemans
    Member
    Posted 2 years ago #

    Hi guys,

    On my website I use contact form 7 with file upload. The contact form sends one email to notify me of a file upload. The second email is send to an xx@sendtodropbox.com email adress, so the file upload is sent to my dropbox.

    Here is the problem:
    If user 1 sends an image/video file it's in my dropbox, great.
    If user 2 sends an image/video file with the same filename, it overwrites the file of user 1.

    Is it possible to change the filename if it already exists? So if user 1 upload image.jpg, and user 2 does the same, it will be something like image-1.jpg?

    Thanks in advance

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    If user 2 sends an image/video file with the same filename, it overwrites the file of user 1.

    This sounds like a matter of sendtodropbox.com side. Why not ask their support?

  3. Belemans
    Member
    Posted 2 years ago #

    Well, because they just send the file to a dropbox account via email.

    My question is actually: how to change the filename of a file upload with contact form 7?
    For instance: image.jpg would change into 29062013-2348.jpg (time format or something else with unique characters)

  4. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 2 years ago #

    This is not possible by default. If you are familiar with WordPress hook, try utilizing wpcf7_mail_components filter. The filter is used in includes/classes.php.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic