Hi Ralf

Thanks for the code snippet. It works alright. One thing I run into is
that simple media images exported as a package are corrupt when you
import them again. They look kind of inverted. I looked into the
properties but found nothing obvious. I will make a bug report for
that.

regards,

Ernst

2011/5/12 Ralf Hirning <[email protected]>:
>
> Hi Ernst,
>
> this should do the trick. Maybe you can try this in a simple JSP. Please
> make sure that the heap size is large enough
>
> File file = new File(fileInFileSystem);
> PackageDefinition packageDefinition = PackageDefinition.fromJar(file);
> Iterator<String> it = PackageUtil.getRepositoriesIterator();
> while (it.hasNext()) {
>    String repository = it.next();
>    final List<UpdateAction> files =
> packageDefinition.compareFiles(file, repository);
>    final Iterator<UpdateAction> fileIt = files.iterator();
>    while (fileIt.hasNext()) {
>        final UpdateAction sorted = fileIt.next();
>        sorted.execute(packageDefinition, installFile);
>    }
> }
>
> Ralf
>
>
> Am 12.05.11 12:00, schrieb Ernst Bunders:
>> 2011/5/12 Magnolia Forums (on behalf of Gr?gory Joseph)
>> <[email protected]>:
>>> ... but rather than allowing your Magnolia instance to accept huge uploads 
>>> (which might put your server at risk, should a malicious person try to 
>>> upload stuff... even if nothing gets uploaded in the end, the temp file 
>>> created by Tomcat while the upload is going on might be a problem), I'd 
>>> transfer the file locally, and modify the packager module to be able to use 
>>> local files as well ? As an EE customer, you have access to the sources ;)
>> That's not a bad suggestion. Of course it's convenient to upload a
>> package to various servers through the browser, but it's not a big
>> deal to scp the package around. Given time (allways short) I'll look
>> into it. Especially the admincentral ui stuff is a bit daunting. But
>> Perhaps something simple. Or do you guys at Magnolia perhaps have a
>> sufficiently bored interim hanging around for such a nice little job?
>> :-)
>>
>> regards,
>>
>> Ernst
>>
>>> --
>>> Context is everything: 
>>> http://forum.magnolia-cms.com/forum/thread.html?threadId=85c86faf-a339-4be0-8b72-361499a1a056
>>>
>>>
>>> ----------------------------------------------------------------
>>> For list details see
>>> http://www.magnolia-cms.com/home/community/mailing-lists.html
>>> To unsubscribe, E-mail to: <[email protected]>
>>> ----------------------------------------------------------------
>>>
>>>
>>
>>
>
>
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
>
>



-- 
Ernst Bunders
Ontwikkelaar VPRO


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to