downloading a file, question on how to call function
Hello,
I am attempting to use the code in the answer to this question:
http://developer.appcelerator.com/question/45471/how-to-save-a-remote-imagepicture-to-database-or-filesystem
I do not think I am calling the function correctly. Here is how I am trying to call it: get_remote_file('iphoneimage.jpg','http://nickbodmer.com/temp/iphoneimage.jpg');
this gives the following error within titanium
[WARN] Exception in event callback. {
expressionBeginOffset = 1066;
expressionCaretOffset = 1072;
expressionEndOffset = 1082;
line = 35;
message = "Result of expression 'fn_end' [undefined] is not a function.";
name = TypeError;
sourceId = 237348568;
sourceURL = "file://localhost/Users/Nick/appcelerator/scrollview/scrollview/Resources/app.js";
}
2 Answers
-
here is a complete solution from the Kitchen Sink Demo - xhr_filedownload.js
-
does this persistently download the file? As far as I can tell, it does not.