What i want is that a user can select a complete path in his local drive and then a file (which is in the war folder of my app right now) will be saved in that selected user location
I am using File upload in GWT to upload my files , its working fine , will i use FileUpload for Download as well?
Also for a second option if there's a possibility to get the location which user have selected for example d:\downloadfolder, my problem will solve, i will do the rest !
below is the code for uploading , Please help me with Download
final String UPLOAD_ACTION_URL = GWT.getModuleBaseURL() + "upload";
initWidget(panelImages);
final FormPanel form = new FormPanel();
form.setAction(UPLOAD_ACTION_URL);
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);
FileUpload upload = new FileUpload();
upload.setName("uploadFormElement");
panel.add(upload);
// Add a 'submit' button.
panel.add(new Button("Submit", new ClickHandler() {
public void onClick(ClickEvent event) {
form.submit();
}
}));
form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
public void onSubmitComplete(SubmitCompleteEvent event) {
if(event.getResults().contains("DataBase Restored")){
Window.alert("Database Restored !");
}
}
});
panelImages.add(form);