On 05/06/14 21:16, Ian Dickinson wrote:
Hi Andy,
What's the API for file uploads to F2? I can't see it in the docs**,
and I've failed to puzzle it out from your prototype implementation.
I'm guessing that for dataset foo, I use
/foo/upload
as the destination on the upload form. Is that correct?
Yes.
The upload is a standard file upload - multipart with a parameter for
the graph name (or "default" or empty) and a file content part.
The upload approach is problematic at scale:
The graph name can come after the file content so you don't know the
destination until you see the whole request. That is, the request needs
to be buffered. And the jquery-fileuploader does seem to send the name
after the content.
It would be better to only use the SPARQL Graph Store Protocol for data
upload but that's was beyond my capabilities in finite time of dealing
with files etc from within the browser.
Caution: I didn't make the jquery fileuploader work properly - I
couldn't get it to pick up the target URL properly so I tweaked it to
pull in the URL, rather the rest of the code push it into the right place.
Thanks,
Ian
** which could be me - rtfd and a pointer is a good answer :)
Less documented as it's not as stable. That's my storey.