Github user afs commented on a diff in the pull request:

    https://github.com/apache/jena/pull/459#discussion_r209421902
  
    --- Diff: 
jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_Upload.java
 ---
    @@ -20,35 +20,39 @@
     
     import static java.lang.String.format ;
     
    -import java.io.InputStream ;
     import java.io.PrintWriter ;
    -import java.util.zip.GZIPInputStream ;
     
     import javax.servlet.http.HttpServletRequest ;
     import javax.servlet.http.HttpServletResponse ;
     
    -import org.apache.commons.fileupload.FileItemIterator ;
    -import org.apache.commons.fileupload.FileItemStream ;
     import org.apache.commons.fileupload.servlet.ServletFileUpload ;
    -import org.apache.commons.fileupload.util.Streams ;
    -import org.apache.jena.atlas.web.ContentType ;
     import org.apache.jena.fuseki.Fuseki ;
     import org.apache.jena.fuseki.FusekiLib ;
    +import org.apache.jena.fuseki.system.Upload;
    +import org.apache.jena.fuseki.system.UploadDetailsWithName;
     import org.apache.jena.graph.Node ;
     import org.apache.jena.graph.NodeFactory ;
    -import org.apache.jena.iri.IRI ;
    -import org.apache.jena.riot.Lang ;
    -import org.apache.jena.riot.RDFLanguages ;
    -import org.apache.jena.riot.lang.StreamRDFCounting ;
    -import org.apache.jena.riot.system.IRIResolver ;
    -import org.apache.jena.riot.system.StreamRDF ;
    -import org.apache.jena.riot.system.StreamRDFLib ;
     import org.apache.jena.riot.web.HttpNames ;
     import org.apache.jena.sparql.core.DatasetGraph ;
    -import org.apache.jena.sparql.core.DatasetGraphFactory ;
     import org.apache.jena.sparql.core.Quad ;
     import org.apache.jena.web.HttpSC ;
     
    +/**
    + * Upload data into a graph within a dataset. This is fuseki:serviceUpload.
    + * 
    + * It is better to use GSP POST with the body being the content.
    + * 
    + * This class work with general HTML form file upload wherte  has the name 
somewhere in the form and that may be
    + * after the data.
    + * 
    + * With sophisticated use of {@link ServletFileUpload}, it is possible to 
stream to disk
    + * avoid an in-memory copy. The whole form is processed to find the fields 
before parsing starts
    + * and potentially is is several files.
    --- End diff --
    
    Fixed. 
    
    Also - moved much of the comment text into Upload. With all the code moving 
the more implement-centric comment should move as well.
    
    (Sorting out `Upload` itself is another task for some other time. Code 
reorg is small step towards that.)



---

Reply via email to