Tuesday, August 18, 2009 at 7:54 PM.
howtoSuite.menuCommands.uploadImage
<<Changes <<8/2/08; 10:34:21 AM by DW <<Created. if file.getfiledialog ("Image file to upload?", @user.howto.prefs.client.lastImageFile, 0) { local (username = user.identica.prefs.username, password = user.identica.prefs.password); local (f = user.howto.prefs.client.lastImageFile); local (bits = string (file.readwholefile (f)), fname = file.filefrompath (f)); local (atts = [user.howto.prefs.client.serverUrl].howto.saveimage (username, password, bits, fname)); case dialog.threeway (atts.imgurl, "Clipboard", "Browser", "Cancel") { 1 { clipboard.putvalue (atts.imgurl)}; 2 { webbrowser.openurl (atts.imgurl); webbrowser.bringtofront ()}}}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.