WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Contact Form 7 to Database Extension] Uploaded images "truncated"

[Resolved] [Plugin: Contact Form 7 to Database Extension] Uploaded images "truncated"

  • 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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Michael Simpson

    @msimpson

    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.

    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.

    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.

    Plugin Author Michael Simpson

    @msimpson

    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

    Examples sent to your email. Thank you.

    Plugin Author Michael Simpson

    @msimpson

    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?

    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!

    Plugin Author Michael Simpson

    @msimpson

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Contact Form 7 to Database Extension] Uploaded images "truncated"’ is closed to new replies.