You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Martin Wehner (Commented) (JIRA)" <ji...@apache.org> on 2011/12/06 19:21:40 UTC

[jira] [Commented] (SLING-2166) Make file upload logic configurable

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

Martin Wehner commented on SLING-2166:
--------------------------------------

We ran into issues with the absence of any configuration options for the upload handling too and would like to expose some of the internal options, including:

* Upload size limit
* Temporary directory
* Disk commit size threshold

What would be the proper place to locate these options? Would it be the Sling Main Servlet configuration (as the encoding option is already there)?

And what would would be the preferred way to handle the cleanup of the temporary files? Expose the MultipartRequestParameter.dispose() method to enable an application to do the cleanup itself or implement some auto-reaping using the FileCleaningTracker as mentioned above?

If someone can hint me in the right direction I would try to cook up a patch.

                
> Make file upload logic configurable
> -----------------------------------
>
>                 Key: SLING-2166
>                 URL: https://issues.apache.org/jira/browse/SLING-2166
>             Project: Sling
>          Issue Type: Improvement
>          Components: Engine
>            Reporter: Chetan Mehrotra
>            Priority: Minor
>
> The current file upload logic in Sling Engine (as present in ParameterSupport [1]  class) relies on Common Fileupload. This logic can be enhanced to use some features provided by the Common Fileupload library
> - Allow location of folder where temporary files are created configurable. This can be done by specifying the repository in the DiskFileItemFactory. So for Sling we can set to a folder under launchpad and better manage it
> - Enable the FileCleaningTracker such that any temporary file that gets created also get deleted.
> - Allow specifying the maximum file size that can be uploaded
> - Update the version of file upload library
> Further the FileCleaningTracker can be exposed as a service and used by other components
> [1] http://svn.apache.org/repos/asf/sling/trunk/bundles/engine/src/main/java/org/apache/sling/engine/impl/parameters/ParameterSupport.java
> [2] http://svn.apache.org/repos/asf/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileCleaningTracker.java

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira