15
Views
1
Comments
How to upload File on a Shared Folder Using Filesystems?
Application Type
Reactive

Hi Everyone, I want to implement a functionality where User can Upload file to a shared Folder / Hot Folder mapped to him/her.

I have tried Using Filesystem for the Same.


This is the action in which I want this to happen.

I am fetching data from Aggregate using a server action and then converting it into an excel file which I want to Upload.

The name of the path are different according to User , e.g, 

\\10.65.9.206\ALLHRIS_FABTEST\71009129

\\10.65.9.206\allhris_smeandrcu\71006495

, Etc.

in The File _WriteBinary Action I am assigning any of the above path as per logged in User.

I am providing the Username and Password as well. 

In the domain I am providing "10.65.9.206\ALLHRIS_FABTEST"

However I am getting different- different Errors.

Win32Error: 1272

System.IO.DirectoryNotFoundException: Could not find a part of the path '\\10.65.9.206\ALLHRIS_FABTEST'.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)

   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)

   at OutSystems.NssFileSystem.CssFileSystem.MssFile_WriteBinary(Byte[] ssContent, String ssPath, String ssDomain, String ssUsername, String ssPassword, String& ssError_message)


Win32Error: 1272

System.IO.IOException: You can't access this shared folder because your organization's security policies block unauthenticated guest access. These policies help protect your PC from unsafe or malicious devices on the network.


Win32Error: 997

System.ArgumentNullException: Value cannot be null.

Parameter name: path

How do I resolve this. ( Only 1 error at a time is coming depending on value provided )

I tried Path like 

"\\10.65.9.206\ALLHRIS_FABTEST\71009129" +FileName


Thank you.

Hi,

Are you running OutSystems in the cloud, and is your shared folder on a private network? 

If so, then you need a VPN, AWS transit gateway, or AWS direct connect configured to be able to connect to your private network. 

Regards,

Daniel

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.