{"title":"File.UploadIntoStream(Text, var InStream) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/file/file-uploadintostream-string-instream-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/file/file-uploadintostream-string-instream-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/file/file-uploadintostream-string-instream-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Sends a file from the client computer to the corresponding server.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"File.UploadIntoStream(Text, var InStream) Method","slug":"fileuploadintostreamtext-var-instream-method","at":0,"chars":2255},{"level":2,"title":"Syntax","slug":"syntax","at":270,"chars":169},{"level":2,"title":"Parameters","slug":"parameters","at":439,"chars":251},{"level":2,"title":"Return Value","slug":"return-value","at":690,"chars":238},{"level":2,"title":"Remarks","slug":"remarks","at":928,"chars":794},{"level":2,"title":"Example","slug":"example","at":1722,"chars":401},{"level":2,"title":"Related information","slug":"related-information","at":2123,"chars":132}],"text":"# File.UploadIntoStream(Text, var InStream) Method\n> Version: _Available or changed with runtime version 7.0._\nSends a file from the client computer to the corresponding server. The client computer is the computer that is running a browser that accesses the web client.\n## Syntax\n```al\n[Ok := ]  File.UploadIntoStream(FromFilter: Text, var InStream: InStream)\n```\n> NOTE\n> This method can be invoked without specifying the data type name.\n## Parameters\nFromFilter\nType: ../text/text-data-type\nThe type of file that can be uploaded to the server. A user can try to upload any file type but an error occurs if the file is not the specified type.\nInStream\nType: ../instream/instream-data-type\n## Return Value\n*[Optional] Ok*\nType: ../boolean/boolean-data-type\ntrue if the operation was successful; otherwise false. If you omit this optional return value and the operation does not execute successfully, a runtime error will occur.\n## Remarks\n> NOTE\n> This method is not supported on devices that run Apple iOS, such as iPad. The dialog box for uploading a file displays, but it is turned off and the user cannot select a file.\nThe business logic runs on the Dynamics 365 Business Central service and not on the client. Files are created on Dynamics 365 Business Central service and not locally on the client computer.\nUse file-upload-method and file-uploadintostream-string-string-string-text-instream-method to send a file from the client to the Dynamics 365 Business Central service.\nUse file-download-method and file-downloadfromstream-method to send a file from the Dynamics 365 Business Central service to the client.\nWe recommend that you use the methods in codeunit 419, File Management, to upload and download files.\n## Example\nThe FromFilter parameter must follow this pattern:\n`<ExtensionGroupName>|<extension1>;<extension2>`, for example `'Word files|*.docx;*.doc'`.\n```al\ncodeunit 50100 MyCodeunit\n{\n\n    procedure MyProcedure()\n    var\n        FromFilter: Text;\n        NVInStream: InStream;\n    begin\n        FromFilter := 'All Files (*.*)|*.*';\n        UploadIntoStream(FromFilter, NVInStream);\n    end;\n\n}\n```\n## Related information\nfile-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}