Save files from Server to Client

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Feb 1, 2018
Company: Smart ID Dynamics

Hello!

I am trying to resolve a situation like this: when the user, in the web-clinet, press a button a spreadsheet document will be generated in background and when it is done the user will select the path to save it on his PC with the FileDialog. I have tryied with BeginCopyingFile, MoveFile but is not working. If I use the standard command of the spreadhsheet it wil freeze the browser when the document is too big (and here is more time to wait to display it on the interface) and I want to avoid this case.

Please tell me if you know.

 
#2
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Mar 10, 2017
Company: Rufinor

Hello!

Can you please clarify? By generating in background do you mean that the report is generated by the scheduled job or is generated interactive by user but on the server side ?

Kind regards,
Alex

 
#3
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Feb 1, 2018
Company: Smart ID Dynamics

Hello!
Sorry for the late reply.

I will try to explain more clearly.

When I press a button on a list form, I am launching a background job. This background job selects line from a information register and generates a spreadsheet with the datas. After it is done processing it writes the spreadsheet on a directory on the server. After witeing the file, I am trying with a filedialog to get a root from a user's computer(a local computer) and do a BeginCopyingFile with the path of the document on the server and the path from the user's local computer, to transfer the document from the server directory to the user's directory. Thisshould be done from the web client.
I have set the file extension correctly on my computer and tryied from Chrome/Mozille/IE but it would not save the doc from the server to my local path specified. It just gives "Error copying file.".

Please let me know if it is still not very clear. :)

 
Subscribe
Be the first to know tips & trick on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.