[ 
https://issues.apache.org/jira/browse/JENA-2270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486350#comment-17486350
 ] 

Andy Seaborne edited comment on JENA-2270 at 2/5/22, 10:36 AM:
---------------------------------------------------------------

No work in the UI, all server side refinement.
I've added a JIRA component tag "Fuseki UI" so tickets can mark this.

The UI isn't triggering a path that went to the old "upload" endpoint.

The {{file-upload}} JS component does use MIME type multipart uploads for files 
but it seems the GSP endpoint already supports this.

The GSP endpoint supports regular POST/PUT to the dataset when no {{?default}} 
or {{?graph=}} is present.

The ticket is about clearing up the code in the server. That code is using 
[Apache Common 
FileUpload|https://commons.apache.org/proper/commons-fileupload/] which is 
{{{}javax{}}}. If the code is tidied up and usage of the java FileUpload is in 
only two functions.

There is a commons-fileupload2 in the pipeline which is based on {{jakarta}}. 
FILEUPLOAD-309.

It is already supporting {{multipart/form-data}} (restricted to file use), 
looking the filename extension if necessary, and {{multipart/mixed}} Data is 
sent to the same destination.

Sending a TriG file (which can be the concatenation of several files) is for 
these cases is cleaner, especially if {{multipart/mixed}}-like transfer is 
required.

{{file-upload}} does not send multiple files in one HTTP request, nor did the 
old UI. They both do multiple parallel requests, which is fine. The server log 
has one request per file, and the request overlap.

The only difference is that pre-4.4 uses the dataset URL, and now the UI uses 
{{{}/datasets/data{}}}. Fuseki has "dispatch by content-type" on the dataset 
URL although the UI uses {{{}/data{}}}.

All good - the UI does not have to know the file extension to content-type 
mapping. JSON-LD 1.1 upload work if the extension if {{.jsonld11}} which is a 
new feature in Jena and no UI changes were necessary.


was (Author: andy.seaborne):
No work in the UI, all server side refinement.
I've added a JIRA component tag "Fuseki UI" so tickets can mark this.

The UI isn't triggering a path that went to the old "upload" endpoint.

The {{file-upload}} JS component does use MIME type multipart uploads for files 
but it seems the GSP endpoint already supports this.

The GSP endpoint supports regular POST/PUT to the dataset when no {{?default}} 
or {{?graph=}} is present.

The ticket is about clearing up the code in the server. That code is using 
[Apache Common 
FileUpload|https://commons.apache.org/proper/commons-fileupload/] which is 
{{{}javax{}}}. If the code is tidied up and usage of the java FileUpload is in 
only two functions.

It is already supporting {{multipart/form-data}} (restricted to file use), 
looking the filename extension if necessary, and {{multipart/mixed }} Data is 
sent to the same destination.

Sending a TriG file (which can be the concatenation of several files) is for 
these cases is cleaner, especially if {{{}multipart/mixed{}}}-like transfer is 
required.

{{file-upload}} does not send multiple files in one HTTP request, nor did the 
old UI. They both do multiple parallel requests, which is fine. The server log 
has one request per file, and the request overlap.

The only difference is that pre-4.4 uses the dataset URL, and now the UI uses 
{{{}/datasets/data{}}}. Fuseki has "dispatch by content-type" on the dataset 
URL although the UI uses {{{}/data{}}}.

All good - the UI does not have to know the file extension to content-type 
mapping. JSON-LD 1.1 upload work if the extension if {{.jsonld11}} which is a 
new feature in Jena and no UI changes were necessary.

> Improve Fuseki data upload functionality.
> -----------------------------------------
>
>                 Key: JENA-2270
>                 URL: https://issues.apache.org/jira/browse/JENA-2270
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Fuseki
>    Affects Versions: Jena 4.4.0
>            Reporter: Andy Seaborne
>            Assignee: Andy Seaborne
>            Priority: Minor
>
> Continues JENA-2248.
> The upload code has become messy with duplication. 
> Functionality for HTML file upload {{<input type="file">}} has a dependency 
> on code using {{javax}}, and not {{jakarta}}.
> {{HTML_FileUpload}} is dated and it buffers its input.
> This is a step towards having the option to remove HTML file upload 
> capability.
> A new general data uploader for sending data to a dataset will cover the 
> functionality better.
> The only use of HTML file upload not covered is when the graph name is in the 
> multipart content. This predates SPARQL Graph Store Protocol which is a 
> better approach because the graph name is available at the start and so the 
> data can transactionally stream to the right destination. HTML file upload 
> can, in theory, supply the graph name after the data.
> The UI "add data" tab uses GSP style to load data.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to