The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Sep 16, 2013
Company:

Hello,

what is the proper way to put file into the temporary storage with the Web Client? I use the 8.3.3.721 1C Enterprise version and I have file extension installed and attached.

I have tried:

1. FileDialog in open file mode - I can serch the file, then after file selecting the parameter FullFileName is still empty. Why? In thin client this same procedure works good. Without full Path I can not save file into temporary storage.

2. PutFile - does not work in Web Client in this version 1C (8.3.3.721) - somthing like this: "Method of the object is not found". In documentation this method is aviable in Web Client. Is any bug in this version?

3. PutFiles - the window searching files shows properly, I sel ect the file but the metod PutFiles returns false. I checked the placedFiles files parameter id Debug - its empty.

So I do not know how I should save files into temporary storage in Web Client mode.

I want to attach picture tho the product and maybe there is another way to choose file from local disc with the Web Client and then save it into the storage? I will be grateful for short example.

Edited: kris s - Aug 03, 2014 01:09 AM
 
#2
People who like this: 0 Yes / 0 No
Just came
Rating: 1
Joined: Oct 8, 2013
Company:

Did you use "InstallFileSystemExtension" and "AttachFileSystemExtension"?

 
#3
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Hello, kris s,

Please provide the Script that you are using when trying the PutFile function.

 
#4
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Sep 16, 2013
Company:

Yes, I have used these both methods ("InstallFileSystemExtension" and "AttachFileSystemExtension").
Here is my testing script. Please check it in Web Client.

Code
&AtClient
// Procedure - handler of command OpenFile.
//
Procedure OpenFile(Command)
   var temp;
   TempStorageAddress = "";
   SelectedFile = "";
   FileName = "Temp";
   
   InstallFileSystemExtension();   
   temp = AttachFileSystemExtension(); // Here temp is true
   
   Mode = FileDialogMode.Open;
   OpeningFileDialog = New FileDialog(Mode);
   OpeningFileDialog.FullFileName = "";
   OpeningFileDialog.Multiselect = False;
   
   OpeningFileDialog.Title = "Choose file";
   
   If OpeningFileDialog.Choose() Then
      temp =    OpeningFileDialog.FullFileName;
      DoMessageBox(temp); //Here temp parameter is empty      
   endif;
   //Another way: by PutFile - here is the message "Method of the object is not found (PutFile)"
   //I see it in Polish: "Metoda obiektu nie odnaleziona (PutFile)"
   PutFile(TempStorageAddress, FileName, SelectedFile, True, UUID);
EndProcedure 

 
#5
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Thank you for the information.

First, you need only those two lines:

Code
   TempStorageAddress = "";
   PutFile(TempStorageAddress, , , True, UUID);


But unfortunately in web client there is a but, I have submitted it thanks to you.

Please use ПоместитьФайл() instead of PutFile() until this issue will be fixed.

 
#6
People who like this: 0 Yes / 0 No
Active user
Rating: 2
Joined: Sep 16, 2013
Company:

It works, thanks.

 
#7
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

This issue will be fixed in 1C:Enterprise 8.3.6.

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