WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form DB
[resolved] [Plugin: Contact Form 7 to Database Extension] Uploaded images "truncated" (9 posts)

  1. joel_birch
    Member
    Posted 3 years ago #

    Great plugin!

    I am having trouble downloading the images that are uploaded via Contact Form 7. When I click on the link to the image in the data table, the image downloads but it is always corrupt or "truncated" as if only part of the data was downloaded. Does anyone have any ideas about what may be happening here?

    Thank you.

  2. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    In the Contact form 7 admin page, in your form definition, you can set an upload limit e.g.
    [file upload limit:10mb]

    I'm speculating that the CF7 plugin is truncating the files if the default setting is less than you need.

  3. joel_birch
    Member
    Posted 3 years ago #

    I tested uploading a small image, well under the limit, but the issue still occurs.

    My thought is that it is something to do with how getFile.php works. I don't really get where getFile.php retrieves the image from, but (and this is sure to be way off) maybe the uploaded image is attached to the email sent from the contact form and deleted from the temporary folder (as I believe is the normal procedure) before it has chance to go into wherever getFile.php needs it to be?

    I'm keen to help you help me figure this out. Please let me know if I can test anything further. Thank you again.

  4. joel_birch
    Member
    Posted 3 years ago #

    I should add that the image comes through fine as an attachment to the contact form email. It is only corrupted when retrieved by getFile.php

    Thanks.

  5. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    GetFile.php is pulling the file out of the database. Perhaps there is an issue with how it is getting stored or retrieved.

    Can you send me an example file that does not work? Use the email listed at the top of getFile.php

  6. joel_birch
    Member
    Posted 3 years ago #

    Examples sent to your email. Thank you.

  7. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Joel,

    I tried uploading your files on my site and everything worked OK. I'm trying to think what might be different about your configuration. I searched the web and I found some complaints about this kind of issue (currupted LONGBLOB in MySQL) and in some cases it was related the MySQL version.

    I am using MySQL5.0, what version are you running?

  8. joel_birch
    Member
    Posted 3 years ago #

    Thanks for looking into this again, Michael.

    I just logged into phpMyAdmin to check the MySQL version and noticed this warning message at the bottom:

    "Your PHP MySQL library version 4.1.22 differs from your MySQL server version 5.1.48. This may cause unpredictable behavior."

    This looks interesting. I'll follow this up with my host. I have a dedicated server for this particular site, so I should be able to get this altered. Will post here to let you know how it went.

    Again, thank you so much for your help. I have advised my client that they should send you a donation and they agreed, so hopefully that happens. Not that donations ever amount to anything approaching a slim fraction the time you put in.

    Cheers!

  9. Michael Simpson
    Member
    Plugin Author

    Posted 3 years ago #

    I appreciate any donations. I can't guarantee that the MySQL upgrade will fix the problem, but it seems promising.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic