This calculator function reads and retrieves information from a file or URL.

File Reader

Purpose

The File Reader function allows you to upload a file and retrieve information about the file, such as the file name and file type.

Use Cases

  • When you want to know the name and type of a file you have uploaded.
  • When you need to verify the details of a file before further processing.

How to Use

  1. Click on the "Choose File" button to select the file you want to upload.
  2. Once the file is selected, click on the "Upload" button.
  3. The function will process the file and display the file name and file type.

Input Values

  1. Upload File - Select the file you want to upload. Default unit is inch.

Output Values

  1. File Name - The name of the uploaded file.
  2. File Type - The type of the uploaded file.

Any other Instruction

  • Make sure to select the correct file that you want to upload.
  • If an error occurs, ensure that the file selected is valid.

Steps of Calculation

  1. Check if the upload file parameter is provided.
  2. If the file is provided, return the file name and file type.
  3. If no file is provided, raise an error indicating that a valid file or URL is not found.

Technical Parameter names

upload_file

Return Values

file_name, file_type

Example Expressions

You can use the following expressions to directly evaluate in a non-interactive manner using eval().

file_reader(upload_file=myfile.txt)
file_reader(upload_file=mydocument.docx)

Click on Help icon to open the help page on a separate window.






Calculator: file_reader, Created by: super, V#0: , Variant owner: , Link