Hi,
I am trying to upload a binary file into a shared drive but could not find any solution.
I tried using FileSystems from forge and used File_WriteBinary action to do that task but it ends with a error message when I debug it.
It would be a great help if anyone can help with this.
Thanks in advance.
Hello Ankita,
The error can be found here: https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-
It means that windows couldn't find the path.
This may be because the path does not exist, is temporarily unavailable or maybe the user used by IIS when interacting with the SO does not have permissions to access this path (like it is not visible to the user).
What is the path you are using?
Could you show the configuration of the File_WriteBinary?
Cheers.
Eduardo Jauch wrote:
Hello,
Thank you for your reply.
I am using the latest version of outsystems (11.55.44).
As I am new to FileSystems in OutSystems so don't know much about it.
I can show you what configuration I have done in FileWrite_Binary action.
I actually want to upload the file on my google drive or any other shared location.
First I tried to write the path in double quotes but Still there was similar error (ex:
SyntaxEditor Code Snippet
"C:\OneDrive\OutSystems"
)
Thank you
P.S. By the way, which version of the platform and which version of the FileSystem are you using?Old versions did not work with shared drives, I think.
If its error 3 it means: The system cannot find the path specified
You probably already knew this, but is this share known from the IIS Users point of View?
It would be better if you could just use the actual path instead of the share.
If I am not wrong, I remember that now it is not possible to upload files to the application folder anymore? Hence the error.
If you wants to upload to a shared path, the IIS user for the OutSystems application must have access to it, and the syntax will be: \\Domain\Shared Folder\
Regarding sending files to GoogleDrive and so on, the better is to use a component from forge for that, like this one: https://www.outsystems.com/forge/component-overview/364/google-drive-connector
Hope this helps.
P.S. You CAN'T upload files to your own computer (C:\OneDrive\OutSystems).
Remember, you are sending the file to the "server". If you want to send to your OneDrive, you need a similar approach as to the GoogleDrive, like https://www.outsystems.com/forge/component-overview/1010/onedrive-connector or https://www.outsystems.com/forge/component-overview/5552/microsoft-graph-connector
Hi Ankita,first i want ask you whic platform you using mean OnPremises or Cloud.if you are using cloud than cannot get access direct path of cloud platform.Because "Path_GetApplicationDirectory" return path of where your espace running
like-
"c/programfile/outsystem/platformserver/running/espacename.randomnumber "
and i assume shared drived can not access directly.
if you are using OnPremises than you can upload you document on specific drive and get from same.
On cloud-
Follow this steps to put file on server path and get file from same
For Getfile from server-
Path_GetApplicationDirectory.ApplicationDirectory+"\TempFolder\"+FileName
If you want to getlist of file from same directory Use "Directory_ListFiles"Actions.
Hope this will help you.
Thanks
Rahul Sahu
Rahul Sahu wrote:
Hi Rahul,
Still Same error is coming that path is not found. I am not getting what wrong I am doing.
Please Help
Be careful putting files on temporary folders...
Still saying: If you get this error it means either the directory doesnot exist, or you don't have access to it (you = IIS Server user).
Do you have a path on the OS server you know exists for sure? Please try that one.
Stefano Valente wrote:
hi,
I didn't get you. Can you please explain a bit. As i am new to FileSystems so don't know much. Or suggest me any tutorial from where I can learn more about fileSystems.
Ankita Jaggi wrote:
The first time i used the FileSystems component i didn;t know the folderstructure of our OS server (cloud). So i first got all files and folders from the C drive, because it always exists. That got me an exception because the IIS user does not have permission to access the recycle bin.
Just trying to say: Look from the perspective of the IIS user, being logged on on the cloud server. Filesystem component is used to access files from that server, only from locations that user has access to.
Looking at your example, you try to access ApplicationDirectory + \Tempfolder\Images
My questions are:
1- Does that location exist?
2- Does the IIS User have access to it?
The Tempfolder does exist, looking at your example. Can you get a list of all files in that directory or do you get the same win32 error?.
When I used Directory_ListFiles action then also I got error mesaage
What should be done ? Please suggest
kindly share your OML then only we got to know
thanks