Hi Ben,

For the following code, I didn't understand where I can test it... I would
> like to solve this problem with IE...
>

Since you did not respond to my last email, I'll blindly propose a solution
that might fix the problem you are experiencing on IE.

1. Open up XWiki/OfficeImporterResults wiki page and go to wiki editing
mode, you should see the following code snippet at the top of the page:


> <code>
>  #set($fileUpload=$xwiki.fileupload)
>   #set($fileName=$fileUpload.getFileName("filePath"))
>    #if(! $fileName)
>      {{error}}$msg.get("xe.officeimporter.results.missingfile",
> [$goBack]){{/error}}
>    #else
>     #set($void=$fileUpload.loadFileList())
>      #set($officeFileStream=$fileUpload.fileItems.get(0).inputStream)
>   #end
> </code>
>

Now you need add two code lines (wait for it) just under the line:

#set($fileName=$fileUpload.getFileName("filePath"))

New code lines to be added are:

#set($tempIndex = $fileName.lastIndexOf('/') + 1)
#set($fileName=$fileName.substring($tempIndex))

So, at the end your code snippet should look like:

#set($fileUpload=$xwiki.fileupload)
  #set($fileName=$fileUpload.getFileName("filePath"))
  #set($tempIndex = $fileName.lastIndexOf('/') + 1)
  #set($fileName=$fileName.substring($tempIndex))
   #if(! $fileName)
     {{error}}$msg.get("xe.officeimporter.results.missingfile",
[$goBack]){{/error}}
   #else
    #set($void=$fileUpload.loadFileList())
     #set($officeFileStream=$fileUpload.fileItems.get(0).inputStream)
  #end


I'm not 100% sure if this will solve the problem (since I did not get a
response for my last email). If above code fixes your problem, please let us
know.

Thanks.

- Asiri
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to