Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Attachments of Files bring errors in web-client

Forum

Search UsersRules
Attachments of Files bring errors in web-client
#1
Interested
Points:: 0
Joined:: Nov 10, 2011

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?

Profile
#2
Just came
Points:: 0
Joined:: Dec 22, 2014

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

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



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.