the file can not be open by a ocx when using the method [CuteWebUI_AjaxUploader_OnSelect] in ie10?

  •  03-22-2013, 12:33 AM

    the file can not be open by a ocx when using the method [CuteWebUI_AjaxUploader_OnSelect] in ie10?

    hi.

        there are some codes to hash a file before upload it using a ocx.

         

      js code :

        function CuteWebUI_AjaxUploader_OnSelect(files) {
            alert(document.all("myocx").HashFile(files[0]._internaltask.file1.value));   // files[0]._internaltask.file1.value is E:\\1.txt
            alert(document.all('myocx').HashFile("D:\\1.txt"));                                    // any file not equal upload file

         }

     

        myocx.HashFile code:

          BSTR CDocEditCtrl::HashFile(LPCTSTR strFileName)
           {
               CFile clsFile;

              if (clsFile.Open(strFileName, CFile::modeRead))
              {
                 CString strReturn = "1";
                  return strReturn.AllocSysString();
              }
              else
              {
                 CString strReturn = "0";
                return strReturn.AllocSysString();
              }
          }

     

         when run these codes in ie9,ie8,ie7    the js codes will alert '1' , '1' .. every thing is ok.

         but in ie10, will alert '0' , '1' .  [clsFile.Open] return false.

     

        i send a message by [support] yesterday.  Maybe you will see the same problem.

    pls help.

         

View Complete Thread