This is probably a browser related question although I am not 100% sure so I try to post my question here as well.
When using my B4J Server, in this case as a Fileserver for scanned documents, I noted that when my pdf-document is opened in Google Chrome and I click on the download button (upper right) to save the file on my computer, the name of my webage (in this case "docserver") is proposed as a filename for saving the file as you can see from below image:
I have used other Fileservers and when I want to save the pdf document opened in Crome, the name of the file is suggested as a predefined file-name.
I would like to achieve the same result i.e in this case the proposed name should be "PMI94088.pdf" and not "docserver".
This is my web-handler:
Any ideas?
When using my B4J Server, in this case as a Fileserver for scanned documents, I noted that when my pdf-document is opened in Google Chrome and I click on the download button (upper right) to save the file on my computer, the name of my webage (in this case "docserver") is proposed as a filename for saving the file as you can see from below image:
I have used other Fileservers and when I want to save the pdf document opened in Crome, the name of the file is suggested as a predefined file-name.
I would like to achieve the same result i.e in this case the proposed name should be "PMI94088.pdf" and not "docserver".
This is my web-handler:
B4X:
Sub Handle(req As ServletRequest, resp As ServletResponse)
Dim FileName As String = req.GetParameter("file")
Dim In As InputStream = File.OpenInput("/mnt", FileName) 'su UBUNTU
File.Copy2(In, resp.OutputStream)
End Sub
Any ideas?