FileUpload2 Control

Hi

How can i change the standard directory where files are uploaded?

that depends on your browser. For example, for Internet Explorer 11, go to Tools > Downloads and at the bottom left, select “Options” to set your download location. Other browsers have similar capability in their settings.

Thank you, for your answer, Douglas!
But, actually, I’m using the component FileUpload2 in Natural One to allow my users upload files to my server.
By default, the files are being saved in cisnatural directory.
I’d like to change the default directory.

Hi Ewerton,

where do you want the file to be saved? Within the web application, outside the web application or do you even want to upload them to Natural?
To upload them to Natural you can use the NJX:FILEUPLOAD2 control.

Best Regards,
Christine

Hi Christine,

I want to save the files outside my web application.

Regards!

Hi Ewerton,

the NJX framework uploads the file to the work directory of the application server. In this folder applications are a allowed to do file operations. If you want to save the file to some folder outside of the webapplication you need to make sure that your application server’s security settings allow this.

You can do this by applying an Adapter Listener to your page. This is a simple java class. In this class you simple copy the file to the location you want. NJX gave you the name of the file in the work directory. So, you have all the information to do this.

Is this a possible solution for you?

Best Regards,
Christine

Hi Christine,

I developed a custom control that has the attribute “path” to choose which place the file will be uploaded.
For while, it’s working good.

Thanks advanced,
Ewerton