upload_file
Upload files to SAS Viya Files Service from inline text, local disk path, or URL; optionally target a Content folder for ingestion and folder-scoped consumers.
Instructions
Upload a file to the Viya Files Service, optionally into a Content folder.
Provide the file content through exactly one of:
content— inline text (the original behaviour; text files only).file_path— a path the server reads directly from its own disk (in stdio mode that's your machine). Handles binary files (xlsx, zip, images) untouched. Disable withALLOW_LOCAL_FILE_UPLOAD=false.url— an HTTP(S) URL the server fetches the file from. Also binary-safe.
parent_folder_uri files the upload into a Content folder (e.g.
/folders/folders/{folderId}) — the location %include/filesrvc
ingestion and other folder-scoped consumers need. Without it the file
lands unfiled under the caller's user context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | HTTP(S) URL the server fetches the file from. | |
| content | No | File content as an inline string (small text files). | |
| file_name | Yes | Name for the file. | |
| file_path | No | Path to a file the server reads directly from disk. | |
| content_type | No | MIME type. Defaults to ``text/plain`` for ``content``, else guessed from ``file_name`` (``application/octet-stream`` when unguessable). | |
| parent_folder_uri | No | Target folder URI (``/folders/folders/{id}``); get one from list_files or the Folders service. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||