View Single Post
Old 06-06-2008, 11:22 AM   #3 (permalink)
xenon
The Frequenter
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 357
Thanks: 3
xenon is on a distinguished road
Default

Hello Davey. What I'm trying to do is upload an image/mp3/video file to a server using Jaxer's file wrapper and some server-side language.

About your suggestion...I do know the file modes and how/when to use them. The only problem is that Jaxer's File readAllLines() method throws an error if trying to read a whole file's contents:

Code:
13:17:02 06/06/2008 [  2080] [ERROR] [JS Framework] [framework.onCallback] message: -----======[ jsLib ERROR ]=====-----
         FileName:          file:///C:/webserver/bin/jaxer/framework/JSLib.js
         Result:            -2147549183
         Message:           Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIScriptableUnicodeConverter.ConvertToUnicode]
         LineNumber:        1693
fileName: file:///C:/webserver/bin/jaxer/framework/serverFramework.js
lineNumber: 5990
name: Error
stack:
  -> error("message: -----======[ jsLib ERROR ]=====-----\n         FileName:          file:///C:/webserver/bin/jaxer/framework/JSLib.js\n         Result:            -2147549183\n         Message:           Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIScriptableUnicodeConverter.ConvertToUnicode]\n         LineNumber:        1693\nfileName: file:///C:/webserver/bin/jaxer/framework/serverFramework.js\nlineNumber: 5990\nname: Error",null,onCallback) [line 2665 of serverFramework.js (file:///C:/webserver/bin/jaxer/framework/serverFramework.js)]
  -> Exception([object Error]) [line 5946 of serverFramework.js (file:///C:/webserver/bin/jaxer/framework/serverFramework.js)]
  -> onCallback([object XPCWrappedNative_NoHelper],[object HTMLDocument]) [line 11138 of serverFramework.js (file:///C:/webserver/bin/jaxer/framework/serverFramework.js)]
  -> fire("CALLBACK",[object XPCWrappedNative_NoHelper],[object HTMLDocument]) [line 10102 of serverFramework.js (file:///C:/webserver/bin/jaxer/framework/serverFramework.js)]
  -> coreHTMLParseComplete([object XPCWrappedNative_NoHelper],"jaxerEvent.HTMLParseComplete",null) [line 64 of aptHTMLParseComplete.js (file:///C:/webserver/bin/jaxer/components/aptHTMLParseComplete.js)]
That's the response it throws me (I copied it from the Jaxer log file, but I get it as a javascript alert). Reading the file in chunks (16 kb at a time, for example), also throws the same error. The only solution would be to read the file byte by byte, but that causes a freeze of the browser.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote