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

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