I’m trying to use the File System component in OutSystems to save binary content (e.g., uploaded documents) to the local drive but local folder showing blank and no error message throwing in error log.
Yes, it is possible to upload binary content to a local drive in OutSystems when using the File System component, but only on OutSystems Traditional Web apps running on self-managed (on-premises) or personal environments with direct server file system access. you cannot directly write to the server's file system using the FileSystem component — because Reactive Web runs on the client/browser, not the server.
Options to Handle Binary File Storage in Reactive Web
ave to Database (recommended approach)
Store the binary content in an Entity with a Binary field.
Later, download or process it as needed.
Steps:
Use an Upload widget to get the binary content.
Pass it to a server action (via a button or event).
Save it to the DB using an Entity with a BinaryData attribute.OR Store in External Storage (S3, Azure Blob, etc.)For large-scale, cloud-friendly apps:
Use REST APIs to send binary data to cloud storage services.
Hi Amit,
Now this time I am using Traditional web application and using my personal environment, but I am still getting this error.
Note: I am using my Office laptop
You personal env also not on-premises
@Mohammad Iqbal Yusuf Sheikh : If you expect the file to appear in the C:\Test\ folder on your office laptop after uploading it in the OutSystems application you developed, that will not happen.
Your web application runs on a remote server, not on your local machine. The Upload action shown in your screenshot is executed on that remote server, so File_WriteBinary is attempting to write to the C:\Test\ drive on the server. Since you do not have access to that directory, you are receiving the exception shown.
This behavior is the same for both Reactive Web and Traditional Web applications - without permission to write to the target directory, the error will occur.
The FileSystem component is a Service, and it always runs on the server, regardless of your application type.
Hope this helps.
https://www.outsystems.com/forums/discussion/49212/how-to-upload-a-file-to-a-particular-folder-particular-path-in-server/
Hi Mohammed,
The FileSystem asset contains an Extension, and like all Extensions, they run server side. So this means that the code executes on the server, and as such can only "see" (i.e. access) drives that a) are part of the server or are part of the server's network and b) it has access to. It must also have access to particular directories if you want to read/write there.
So if you are saying "local drive", what do you mean by it? If you mean local to the server, and your app runs in the cloud, there are very limited directories the app is allowed to write to.