[Ur] File I/O
Adam Chlipala
adamc at impredicative.com
Tue Nov 1 20:40:57 EDT 2011
James Parker wrote:
> 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.
I know storing "files" in a relational database is unusual, but do you
have in mind a reason why it wouldn't work for your intended application?
>> 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.
I don't know of any examples online, but, if it's not clear how to do
this based on the Ur/Web manual, let me know, and I'll add whatever info
is missing.
More information about the Ur
mailing list