Hi Chathura,


Yes there is a better approach than  save those files in the jaggery app
> itself. This is mainly because jaggery app is getting bulky, difficult for
> clustering, and less security.
>
> What we have done for mobile app is store them in a secured place such as
> /repository/resources/mobileapps (as the default location) with an
> arbitrary name. It can be configurable to any location in the file system
> or the network.
>
> That file can be read from its physical location using Java and and get an
> input stream via Jaggery for download or you can directly read it from
> Jaggery.
>

As per the offline discussion had with Senthuja and Nisal, we cannot access
location such as /repository/resources/mobileapps from Jaggery.


Thanks
Godwin




>
> On Mon, Oct 17, 2016 at 6:27 PM, Dinusha Senanayaka <dinu...@wso2.com>
> wrote:
>
>> We have done something similar in AppM for mobile apps where publisher
>> uploads binary (.apk etc) and users comes to store install these apps to
>> device.  Download has handled as a byte stream and storage location is
>> stored in property of app-manger.xml (<AbsoluteLocation>${carbon.ho
>> me}/repository/resources/mobileapps/</AbsoluteLocation>) and HostObject
>> method has been provided to get the location.
>>
>> @Chathura should be able to explain the logic more since he implemented
>> this.
>>
>> Regards,
>> Dinusha.
>>
>> On Mon, Oct 17, 2016 at 6:06 PM, Godwin Shrimal <god...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> We need to dynamically create zip file and allow download it from
>>> jaggery application. For resolve the concurrent access of the system, we
>>> are going to create a directory with the time-stamp and archive that
>>> directory and allow user to download it. Then we need to create a separate
>>> cleanup task to clean those directories and archive files.
>>>
>>> We can create above zip files in jaggery application level (ex.
>>> jaggery/dashboard/resource/) and create a cleanup task in OSGI level to
>>> delete the files/directories periodically. Here we need to keep a configure
>>> to find the jaggery application context from OSGI level.
>>>
>>> Do we have a better approach for this or is it fine to use a
>>> configuration for particular jaggery context ?
>>>
>>> Thanks
>>> Godwin
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Senior Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>> twitter: https://twitter.com/godwinamila
>>> <http://wso2.com/signature>
>>>
>>
>>
>>
>> --
>> Dinusha Dilrukshi
>> Associate Technical Lead
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>
>
>
> --
> Regards,
>
> Chatura Dilan Perera
> *Associate Tech Lead** - WSO2 Inc.*
> www.dilan.me
>



-- 
*Godwin Amila Shrimal*
Senior Software Engineer
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware

mobile: *+94772264165*
linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
twitter: https://twitter.com/godwinamila
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to