Never mind :) It is very easy just to have the LC server write out the file.
In stack: on mouseUp put cd fld "UserAccount" into tFileName put cd fld "uploadText" into tUploadText put "title=" before tFileName put "bodytext=" before tUploadText put tFileName & "&" & tUploadText into tPackage post tPackage to URL "http://example.on-rev.com/ADirectory/myproject.lc" --answer the result end mouseUp and on the server: <?lc open file $_POST["title"] write $_POST["bodytext"] to file $_POST["title"] close file $_POST["title"] ?> Thanks! John Patten SUSD On Apr 26, 2013, at 12:00 PM, JOHN PATTEN <[email protected]> wrote: > Hi All… > > I'm looking to upload a simple text file to a specific directory on the > on-rev server. I've looked at the tutorial here > http://lessons.runrev.com/s/lessons/m/4070/l/40708-how-to-upload-a-file-with-livecode-server > and noticed in the comments that the file gets uploaded to tmp. However, > when I look there I don't see the file…? But it reports a successful upload. > > Is there a way to script that file upload to save to a specific directory > within the on-rev server, instead of tmp? > > Or, is it more recommended to have the lc engine write the file on the on-rev > server just using post data, instead of uploading a file. > > > Thank you! > > John Patten > SUSD > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
