The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Interested
Rating: 11
Joined: Nov 10, 2011
Company: 1A Software e.U

Hello!

I would like to attach PDF-files to documents.
In thin client mode it works fine with the code:

Code
&AtClient
Procedure LoadFile1(Command)
  StorageName1 = "";
   FileName = Object.FileName;
   If PutFile(StorageName1, FileName, FileName, True, UUID) Then
      Object.FileDescr = FileName;
      LoadFileServer1(StorageName1);
   EndIf;

EndProcedure

&AtServer
Procedure LoadFileServer1(StorageName1)
   Message(StorageName1);
   ObjectValue = FormDataToValue(Object, Type("DocumentObject.PurchaseInvoice"));
   ObjectValue.Storage1 = New ValueStorage(GetFromTempStorage(StorageName1));
   ObjectValue.Write();
   ValueToFormData(ObjectValue, Object);

EndProcedure


But if a user tries to open this document accessing via web-browser, he gets errors (it is not possibe at all to open the document).

The question is: is it possible with web client to attach some files? Or is it possible to use this procedure only as thin client and just ignore it, if a user accesses via web-browser?

 
#2
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Dec 22, 2014
Company: 1C Company

Hello Lioudmila,

Could you please attach a dt file, also please provide both:
1. What steps do you do and what type of error message do you get?
2. Clear description on what task would you like to attain?

Thank you

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)