You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Valentin Valchev (JIRA)" <ji...@apache.org> on 2013/04/03 09:11:15 UTC

[jira] [Commented] (FELIX-3951) Let users able to specify the directory used to temporarily store uploaded files

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

Valentin Valchev commented on FELIX-3951:
-----------------------------------------

That method will fail if you run the framework with security. In order to make it run correctly, you also need to setup the correct permissions. However, the OSGi specification says that the bundle always has permissions to access it's own bundle storage area.

Therefore a code like that would be more appropriate:
[code]
            File baseDir = FrameworkUtil.getBundle(WebConsoleUtil.class).getBundleContext().getDataFile(""); //$NON-NLS-1$
            DiskFileItemFactory factory = new DiskFileItemFactory(256000, baseDir);
[/code]

Unfortunately that would make web console dependent on OSGi r4 API. To fix that, we should add the BundleContext or directly the File object to the method signature. But this might break some other plugins that may use the method.
                
> Let users able to specify the directory used to temporarily store uploaded files
> --------------------------------------------------------------------------------
>
>                 Key: FELIX-3951
>                 URL: https://issues.apache.org/jira/browse/FELIX-3951
>             Project: Felix
>          Issue Type: Improvement
>          Components: Web Console
>    Affects Versions: webconsole-4.0.0
>            Reporter: Simone Tripodi
>             Fix For: webconsole-4.0.2
>
>         Attachments: FELIX-3951.patch, Screen Shot 2013-03-05 at 2.36.05 PM.pdf
>
>
> As per subject, users should be able to dynamically switch the directory used to temporarily store files, it would be good, for example, to set it to a non-publicly writeable location, for security reasons.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira