[Ur] request for review of file save ffi extension
Orchidaceae Phalaenopsis
orchid.hybrid at gmail.com
Sun Oct 25 10:34:32 EDT 2015
Hello,
I've modified the file upload demo slightly to save the file to the
hard disk instead of echoing it back:
* https://github.com/orchid-hybrid/urweb-file/tree/master
In particular I have used ffi handlers to make saving the file a
transactional operation. I've been very careful to follow the manual
on correct use of the ffi but I would really appreciate if people
would look over this and comment on whether it's correct or not:
* https://github.com/orchid-hybrid/urweb-file/blob/master/file.c
I'm worried about not freeing memory that needed to be, double frees,
using memory after free, things like that.
(N.B. This is step 1 of a larger project, I need to save files to a
folder so that they can be processed by some unix tools before the
results are published)
Thank you very much!
More information about the Ur
mailing list