Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Can not read file content from 1C web app hosted in the cloud

Forum

Search UsersRules
Can not read file content from 1C web app hosted in the cloud
#1
Active user
Points:: 0
Joined:: May 21, 2023

I am trying to read content of text file selected from local computer from my 1C web app hosted in the cloud using methods FileStreams.OpenForRead(Filename) or New BinaryData(Filename) and I get an error message "[ScriptRuntimeError, ScriptUseError], reason: Directory not found". What can be the reason?
If I launch my web app from localhost everything works fine.

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

Hey Peter,

let me some time pls - I'll create a small example how to work with files in web client in 1C

Profile
#3
Active user
Points:: 0
Joined:: May 21, 2023

I solved already this problem. Here's the solution:
Stream = Await FileStreams.OpenForReadAsync( Filename );
FileReader = New DataReader( Stream, TextEncoding.UTF8 );  
FileContent = Await FileReader.ReadCharsAsync( , TextEncoding.UTF8 );

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



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