• Cyrillic file names are not displayed in attachments.

    We uploaded a file with the Cyrillic name Текстовий документ.docx and it was saved on the server without a name, just .docx. Files with Latin names are fine.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Hello @krashlab ,

    Thanks for reaching out.

    Will take a look on this and let you know if we can replicate the issue.

    Can you also provide a screenshot of your “contact -> drag & drop upload” settings?

    Glen

    Thread Starter KR. Laboratories

    (@krashlab)

    We did not change any settings. All settings are by default.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Thanks, I tried today with this filename “Текстовий документ.docx” and it seems fine.

    Please see this screenshots:

    https://ibb.co/yYFs1rf
    https://ibb.co/TR3rp8Y

    Are you using Free or Pro version and may I know what is your current version of the plugin?

    Thread Starter KR. Laboratories

    (@krashlab)

    One important detail: the name of the document contains a space, not a dash and in .docx extension, for example: Текстовий документ.docx
    In your screenshot, filename contains a “-”.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Yes, because any filename that contain space will be sanitize and converted to “-“. It’s needed for security purposes and to clean up the filename.

    More information about the sanitation – https://developer.www.ads-software.com/reference/functions/sanitize_file_name/

    Thread Starter KR. Laboratories

    (@krashlab)

    Then why don’t you make it so that the original name was saved? I think it’s a flaw. Users who send documents through the form are not computer savvy and will never rename files. This should be done automatically by the plugin. Instead, it completely removes the name and leaves only a “-” sign (-.docx). This is not how it should be.

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    Our free plugin doesn’t renamed files even the names contains Cyrillic.

    Sorry, maybe I misunderstood, which is why I asked if you are using the free or pro version, as we have multiple versions of this plugin (free and pro), and I didn’t get any response from you.

    Based the screenshot I sent on my previous reply, it’s accepting “Текстовий документ.docx” filename but it only replaces any space with “-” not removing the file name completely. (tested it using free version)

    Lastly, may I know the exact version of the plugin currently installed?

    Please let me know, thank you.

    Thread Starter KR. Laboratories

    (@krashlab)

    I use FREE VERSION.

    No. You are not telling the truth. Your plugin removes Cyrillic names if they contain a space and simply leaves a “-” instead. I understand that this is for security reasons. But then this is a bug in the functionality. Once again, the users who send files through the form are complete strangers to me, and none of them will rename files specifically for me. And your plugin takes these names and deletes them, after which all the files on my server in the folder are named: -.docx. This is a problem. And it needs to be silently fixed. It’s not difficult.

    Good luck

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    @krashlab Sorry, but I’ve tested it with multiple filename like: документ.txt, изображение.jpg, отчёт.pdf, видео.mp4 etc and I cannot replicate the issue. maybe the issue is related to something else.

    I’m willing to help or fix the issue but I cannot see it my end and I’m having a hard time point out the issue, maybe you could try on our demo site here https://www.codedropz.com/contact/ test it and see how it goes.

    Or can you also try and add this code in your theme/functions.php file.

    add_filter('wpcf7_upload_file_name', 'dnd_cf7_filename', 10, 2 );
    
    function dnd_cf7_filename( $name, $raw_name ) {
      return $raw_name;
    }

    After that, let me know if you still encounter the issue.

    Lastly, you can try and use the default file upload of contact form 7 using [file] tag and compared the results.

    Thanks.

    Thread Starter KR. Laboratories

    (@krashlab)

    Do you tested with filename with space “Текстовий документ.docx”?..

    Plugin Author Glen Don Mongaya

    (@glenwpcoder)

    @krashlab yes cyrillic names with multiple space.

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.