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?