Re: SPARQL protocol and HTTP Update : HTML file upload

On 2010-11-25, at 14:45, Andy Seaborne wrote:
> On 25/11/10 10:40, Steve Harris wrote:
>> On 2010-11-25, at 10:16, Andy Seaborne wrote:
>> 
>>> HTML form file upload is a POST of multipart/form-data [RFC1867].  For most current browsers, it can contain a single file and some other parameters.  The protocol allows multiple files.
>>> 
>>> Is this in/out scope for the SPARQL protocol and SPARQL HTTP Update?
>>> 
>>> It would be good for standard, documented behavior here.  What is needed is:
>>> 
>>> 1/ Note that the 2 specs do apply to multipart/form-data
>>> 2/ Define it so every content-disposition: filename= means load
>>>   as per POST for each of the SPARQL protocols.
>> 
>> This seems sensible, I see filename= as problematic though, as we really need a URI in there for it to be useful.
> 
> filename is part of RFC1867 and is supplied by the browser.
> 
> As the content-type is often application/octet-stream, it can be useful for determining the syntax. :-)
> 
> I have a prototype that adds a form field named-graph-uri (same name as SPARQL query protocol, different meaning).  If it's "", absent or "default" it means the default graph.

Right we use graph= as per the rest of HTTP Update, though it's pre-existing code.

> Would that be what you want?  Tricky for more than one file but we could just restrict ourselves to one file for some text.

Yes, we limit to one file at a time too. It's not been a big issue in practice.

> 1/ Note that the 2 specs do apply to multipart/form-data
> 2/ Define it so every content-disposition: filename= means load
>   as per POST for each of the SPARQL protocols.
> 3/ Define a form field "graph-uri"

Why graph-uri?

- Steve

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

Received on Thursday, 25 November 2010 16:14:27 UTC