Using File Systems Extension : Copying large File from WorkStation to OS Platform Fol

Using File Systems Extension : Copying large File from WorkStation to OS Platform Fol

  

Hey, Gurus!!!!!

I am using File Systems Extension in order to copy file from WorkStation to OS Platform Folder. When I copy small file it is working but when I try largest one It is not working.

I am using FIle_WriteBinary and File_writeText


A voice is claiming for help ....

Hello Edgardo.

Could you please be more specific?
Like what means "not working"? Are you getting an error? A timeout? Nothing at all? There is a message error? What is the size of the file? There is enough space for it in the destination? 

These kind of things.

Cheers :)

Hi Edgardo,

The FileSystem extension allows your applications, running on the Platform Server to have access to the server's file system, not your Workstation file system.

I assume you are using the Upload widget to upload the file from your workstation to the server, and if that's the case, there might be issues with timeout while uploading, could that be the case? If so, your logic that writes the file to the server's file system would never get to run (if you add a breakpoint to the Start node it never stops there).

If you can provide more information, like Eduardo asks, that'd be helpful for us to suggest possible solutions.

I am pretty clear about FileSystem extension...As you mentioned I am trying to copy a large file from WorkStation to OS Platform using upload widget but I thing TimeOut is happening......

How Can I copy from WorkStation to OS?


What do you need? Have you tried to add a breakpoint to the screen action that handles the upload? and debug to see if that code ever gets executed? if it does, it is not a problem with the upload itself, otherwise you might want to ask yourself how often do you need to upload that kind of large file to your server. 

If this is a file you will upload only once, why not add it as a static Resource to one of your modules?

If your end-users need to regularly upload large files into your application, you will probably need to do one or more of the following:

  • reduce the file size if you can (consider uploads of partial information); and/or
  • have a faster network connection between your workstation and the server; and/or
  • configure the web server itself to:
    • allow (potentially) bigger file uploads - be careful what size you choose, as anyone will be able to try and upload files and use it to attack your server; and/or
    • have a longer timeout for requests.

The path you take depends on what your requirements are, and what's the usage scenario for your app.

Jorge

We are taking about monthly transactional file...I have to load from WorkStation to OS Server...

How do I configure the WebServer for large file...? I think it is the path...


Edgardo,

I don't recommend changing the configurations of .NET/IIS without first understanding exactly what's going on with your upload... there might be a simpler and safer solution, and the Web Server should already be configured to allow file uploads of at least 32 MBytes. If your file is smaller, then the issue is elsewhere and you should debug your logic because it's likely the problem isn't with the upload size.

The configurations you wish to change are for .NET/IIS and not specific to OutSystems. You can look for the instructions on the Tuning section of the Installation Checklist on how to configure them with sensible values. These changes are dangerous, so be sure to backup all configuration files that you edit.

In particular, you may need to edit the machine.config file and adjust the value (in KBytes) of the maxRequestLength attribute of the <httpRuntime> element, as well as edit the applicationHost.config file and adjust the value of the maxAllowedContentLength attribute of the <requestLimits> element. Some suggestions are provided in the Checklist, depending on your factory size, and they should be already set up for you as part of the environment installation process:

  • maxRequestLength: 32768, maxAllowedContentLength: 33554432 (for small factory environments)
  • maxRequestLength: 65536, maxAllowedContentLength: 67108864 (medium sized factory environments)
  • maxRequestLength: 131072, maxAllowedContentLength: 134217728 (large factory environments)