It has been a while since Microsoft moved Business Central to the cloud (SaaS), but many people still think: "Okay but why can't I just save a file to a folder like I used to?"
If you remember the good old Dynamics NAV days, we were used to having full control over a server. We could create a folder, save a file there, and read it later. But in the cloud, that setup is gone. Let's break down why that changed and how to handle it like a pro.
The Big Difference: Machine vs. Service
In the old days, you were working on a specific machine. You owned the server, you knew where the hard drive was, and you could save files to local or shared drives without a second thought.
In Business Central SaaS, you aren't working on a machine. You are working with a service.
It is shared: Thousands of companies use the same cloud infrastructure.
It is managed: Microsoft handles all the back-end stuff.
It is temporary: The server where your code runs might restart or move to a different piece of hardware at any time.
Because the system is constantly shifting, you do not have a home folder on the server to store files.
Why Direct File System Access is Blocked in BC SaaS
Understanding why direct file system access is not allowed is key to understanding modern cloud development.
Security & Multi-Tenancy
Tenant isolation: One tenant cannot access another tenant's data.
No server access: You don't have access to the server's file system, because it is not your server.
Attack prevention: Direct file I/O could create opportunities for attackers to exploit server vulnerabilities or navigate through directories.
Technical Reasons
No predictable paths: The structure of the server drive is completely hidden and managed solely by Microsoft.
No persistence guarantee: Servers can scale up or restart at any time.
Why On-Prem Can Access Everything:
Your Infrastructure: The server runs in your own datacenter.
Single Tenant: It is your data, your server, and your rules.
Full Control: You manage all security and access policies.
Legacy Support: The file system capability remains for backward compatibility.
Important Clarification: Why Can't the Browser Save Files Automatically?
Web browsers like Chrome or Edge are designed with strict security boundaries. A website cannot arbitrarily save files to your computer's hard drive without your explicit consent.
The key difference:
On-Prem: The server can save files to network shares for server-side processing because you control the network.
SaaS: The server cannot save to a persistent file system because you don't control the server infrastructure.
This is why On-Prem can still use file-based integrations, while SaaS must use Streams, Cloud Storage, or APIs instead.
How to Handle Files the SaaS Way
The trick is to stop thinking about storing files and start thinking about moving data.
1. Temporary Processing (In-Memory)
Instead of saving a file to a folder to process it, keep the data in the server's memory. You process the data as a "stream" of information. Think of it like pouring water through a pipe i.e. you don't need a bucket to hold it; you just need to ensure it flows from the source to the destination.
2. User Interactions
Use standard upload and download features. These trigger your browser's native file picker. You aren't "saving to a path"; you are initiating a hand-off between the cloud service and your local computer.
3. Long-Term Storage
If you need to keep a file, move it to a dedicated cloud storage service:
Azure Blob Storage: Designed to hold massive amounts of files securely.
SharePoint/OneDrive: Best for documents that users need to view, edit, or share using familiar Office tools.
Database Fields: For small images or tiny documents, store the file content directly in a field within your database tables.
4. Integrations
Stop using "File Drops" (where one system writes a file and another waits for it to appear).
The Modern Way (APIs): Use direct service-to-service communication. When one system needs to talk to another, it sends a request via an API and gets an immediate confirmation. It is faster, more secure, and doesn't rely on files sitting in a folder that might get locked or deleted.
The Fundamental Rule
BC SaaS: Code runs in Microsoft's cloud and cannot see your local infrastructure.
BC On-Prem: Code runs on your server and can see your entire network.
The browser is just the user interface in both cases. Where the server physically sits determines what it can access.
Why This Is Actually Better
No "It works on my machine" issues: Your code will work the same way in every environment.
Better security: Microsoft handles security at the infrastructure level.
Scalability: Cloud storage scales automatically.
Reliability: Cloud storage services have built-in redundancy and backup.
Modern integrations: APIs provide real-time, synchronous communication instead of waiting for file polling.
Bottom Line
The file system didn't disappear; it moved to the cloud. Once you transition to using data streams and API integrations, your solutions will be cleaner, more reliable, and significantly easier to maintain.