I'm trying to download a large file using the downloadmanager and then read the file and Insert the data into a sqlite database:
Code:
                new Mojo.Service.Request("palm://com.palm.downloadmanager/download", {
                        parameters: {
                                'target':url,
                                'targetFilename':'largeFile'
                        },
                        onSuccess: (function(response) {
                                if (response.returnValue && response.returnValue == true) {
                                        this._ticket = response.ticket;
                                } else { Mojo.Log.error("----------------Couldn't get ticket"); }
                        }).bind(this),
                        onFailure: function(response) {
                                if (onErrorCallback) { onErrorCallback(); }
                        }
                });
This works fine, but when the download completes, I have know way of reading it without getting errors:
Code:
                var uri = "file:///media/internal/downloads/largeFile";
                new Ajax.Request(uri, {
                        method: 'get',
                        evalJSON: 'false',
                        onSuccess: function(response) {
                                Mojo.Log.info("successful");
                         },
                        onFailure: (function(response) {
                                Mojo.Log.error(" statusText %s and status %s", response.statusText, response.status);
                        }).bind(this)
                });
The error in the logs says:
statusText OK and status 404.

Does anyone know how to overcome this problem? Or any help?

Thanks,

Jerry