mdsimpson / contact-form-7-to-database-extension

CFDB - WordPress plugin to save form submissions into a database
GNU General Public License v3.0
240 stars 59 forks source link

Image files saving as a string with CF7 4.8 #20

Open CraigT543 opened 7 years ago

CraigT543 commented 7 years ago

Image files save as files when combined with CF7 4.7 but for some reason in CF7 4.8 they are saving as a string.

CraigT543 commented 7 years ago

What I am seeing in place of the file link is a string, inlined image (png), encoded in base64 that looks something like this:

 data:image/png;base64,iVBORw0KGgoAAAA . . . (long string of characters here)

I think the issue with CF7 4.8 is that they are no longer using jQuery Form Plugin to process forms including upload. Now they are using this standard: https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

So I think the function ajaxFile() needs some reworking to deal with this change.