Railo 4/ Tomcat / IIS7.5 / Coldfusion / cffile upload of docx not working

377 Views Asked by At

I just moved a web application from a ColdFusion to Railo server and encountered a puzzling issue with the application's file upload functionality. Everything works fine for almost all files, but .docx files don't get uploaded. In Railo I see the error:

form field [form.theformfieldname] is not a file field

I have registered the "docx" mimetype in IIS and Tomcat as application/vnd.openxmlformats-officedocument.wordprocessingml.document

I just did a small test and cfdumped the #form# twice. The first time with a .doc file, and the second time with a .docx file.

Dump 1: .doc file

Scope
docsbestand string  C:\inetpub\wwwroot\site\WEB-INF\railo\temp\tmp-321.upload
fieldnames string   jsoninput,docsbestand
jsoninput string    {"PRO":{"idaanvraag":"052300022920333" ,"bron":"Spontaan"},"apiklant":"demo","apikey":KL541231231}

Dump 2: .docX file

docsbestand
string  PK!0�(r�[Content_Types].xml �(��T�n�0�W�?D�V������[��0��z��l�I�Q�B� \"%���ك�ښl  �w%�=���^i7+���%�g&�0�A�6�l4��L60#�Ò�S ����X��&��V$z�3��3෽���%p)O5�����5}�:�`�e�ۅ�V�DFK��)_:�K%�)�l��\�!��U�'�v�7�&j�X��*,��+W^.,�����W����k��D�ܚ��X�ݷ��>��N!��FZ�&0m��ly��)�q�9��d}��@��?Ĥ�����R��/��s���*&:t��g������ˉ�8Y�O�[�&V0}�X�?Ȼ���>�#��;�F�io.����PK!���N_rels/.rels �(����JA���a�}7� "���H�w"����w̤ھ�� �P�^����O֛���;�<�aYՠ؛`G�kxm��PY�[��g Gΰino�/<���<�1��ⳆA$>"f3��\�ȾT��I S����������W����Y ig�@��X6_�]7~ f��ˉ�ao�.b*lI�r�j)�,l0�%��b� 6�i���D�_���,  � ���|u�Z^t٢yǯ;!Y,}{�C��/h>��PK!ʡ��9`word/_rels/document.xml.rels �(����N�@��&�ٻl�ZMS�5����la�.�dw���I(4�x�B2�}?fvX�������`(&<�Ĥ%��_o��Ha��AEN����;hE�+��y�.Q���%T���;���".m.k��Tr>�-�z����ۤ����VxqSs���&���M���B�t@�_��S�(��3����D n ��m)�k0�0���Q�y�}�z,>�2��,ϡ'8Jc�)!2�����(�A�O Q�ɶ��]߉J���2��ç�Я��z3)/�ˁ������MI� ۏ���]���!���PK!q�� �word/document.xml�]Ks�H�o����c~B���s�;�nm�F�@��B0�_��B�� !�6�­9�i    J��_>+��巿&�6�o:�Y����4nôGg�LJ��iM�f�rl~V{�~�����e�1��t��@�!l�3��� p;��?� ����ps�x�?�Qc¼�[8�fߴ������Z4�sV�zv'�>1��;��q�Cs���/�s���H���48�?6]_�6y�h��X2���lb����<O3<6yL��s�3\�p߇�W�����gG�C,���LAɄ��rDNJ����5�n�P���\tK}�x�OW�w�Fﬦ���Q�]��Aк~z}t�����M�`����K���~x�Ǎc>���i���ؙ0u|n����_�n��O�֌Y�-ǵ��%�ֈ�n�@�B���c(��k� <SNIP>

string  jsoninput,docsbestand
jsoninput string {"PRO":{"idaanvraag":"052300022920333" ,"bron":"Spontaan"},"apiklant":"demo","apikey":KL541231231}

Somehow the file is not uploaded to the tmp-directory but read/parsed/whatever. And of course the cffile upload wont work in those cases.

What could be causing this?

thanks! Bart

0

There are 0 best solutions below