[Ur] File I/O
James Parker
jp at jamesparker.me
Tue Nov 1 20:36:49 EDT 2011
Hi Marc and Adam,
Thanks for taking the time to respond.
> As Marc noted, standard file IO APIs are incompatible with Ur/Web's transactional model. I'm not a big fan of files, in any context. If you explain what your underlying goal is, then we may be able to suggest good ways to achieve it in Ur/Web.
Just as an introductory exercise, I was attempting to modify the upload example to store the uploaded file to disk. Then when requested, users could download the previously uploaded files.
> You can work around it by remembering what to store in which file and
> writing to disk at the end at commit time. Anyway for that reason you
> should think twice about whether files are the right storage if you want
> to use the filesystem for storing data.
Are there any examples of writing to disk at commit time? I'd rather not store files in the database.
Thanks,
James Parker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20111101/ce80b2a3/attachment.html>
More information about the Ur
mailing list