Hi Lochana,

What you can simply do is read the uploaded file once the upload is
finished and write it to the place where you want :)


On Tue, Oct 7, 2014 at 10:50 AM, Lochana Menikarachchi <[email protected]>
wrote:

> Unfortunately, that's not going to work. Shouldn't there be a file
> uploader in jaggery (that can upload a file to a given location)?
>
> On Tue, Oct 7, 2014 at 10:45 AM, Dilan Udara Ariyaratne <[email protected]>
> wrote:
>
>> Hi Lochana!
>>
>> Do not know exactly whether their is a way to directly
>> give an absolute path and save the file.
>>
>> BTW, as a workaround, if no such way exists, can you try to create the
>> corresponding relative path for the given absolute one
>> and use the same method provided.
>>
>> Cheers!
>>
>>
>> *Dilan U. Ariyaratne*
>> Software Engineer
>> WSO2 Inc. <http://wso2.com/>
>> Mobile: +94775149066
>> lean . enterprise . middleware
>>
>> On Tue, Oct 7, 2014 at 10:29 AM, Lochana Menikarachchi <[email protected]>
>> wrote:
>>
>>> Dilan, There is a specific requirement.. We need to upload a file to a
>>> given location
>>> Madhuka, That method returns absolute path.. What I want is to upload a
>>> file to a given location (that is when absolute path is given as a string)
>>> Thanks.
>>>
>>> On Tue, Oct 7, 2014 at 9:55 AM, madhuka udantha <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> you can do it. absolute path
>>>>
>>>>  var absolute = function (path) {
>>>>         var systemProcess = require('process');
>>>>         var parent = 'file:///' +
>>>> (systemProcess.getProperty('jaggery.home') ||
>>>> systemProcess.getProperty('carbon.home')).replace(/[\\]/g,
>>>> '/').replace(/^[\/]/g, '');
>>>>         return parent + MODULE_PATH + path;
>>>>     };
>>>>
>>>> [1]
>>>> https://github.com/Madhuka/sugarcane/blob/master/core/sugarcane/scripts/engine/test.js
>>>> On Tue, Oct 7, 2014 at 9:37 AM, Lochana Menikarachchi <[email protected]
>>>> > wrote:
>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Madhuka Udantha
>>>> http://madhukaudantha.blogspot.com
>>>>
>>>
>>>
>>>
>>> --
>>> Lochana Menikarachchi
>>> Senior Tech Lead
>>> WSO2 Inc.
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>
>
> --
> Lochana Menikarachchi
> Senior Tech Lead
> WSO2 Inc.
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 

*Dinesh J. Weerakkody*
Software Engineer
WSO2 Inc.
lean | enterprise | middleware
M : +94 727 361788 | E : [email protected] | W : www.wso2.com
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to