Monday, November 08, 2010 at 12:01 AM.
system.verbs.apps.s3.synchFolder.uploadfile
on uploadFile (adrdata, adrfile) {
<<Changes
<<3/6/08; 12:29:55 PM by DW
<<Replace the file path char with / so that folders on the local file system are reflected in the S3 storage space.
local (relpath = string.replaceall (nameof (adrfile^), file.getpathchar (), "/"));
local (path = adrdata^.prefs.rootPath + relpath);
local (f = adrdata^.prefs.folder + nameof (adrfile^));
local (filedata = string (file.readwholefile (f)));
return (s3.newObject (path, filedata))}
<<bundle //test code
<<uploadFile (@user.fileSynch.synchPoints.["Amazon S3"], @user.fileSynch.synchPoints.["Amazon S3"].files.["sundaygang.com:dave:podcastResponseToObama.mp3"])
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.