File Reader (file_reader)
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
- Click on the "Choose File" button to select the file you want to upload.
- Once the file is selected, click on the "Upload" button.
- The function will process the file and display the file name and file type.
Input Values
- Upload File - Select the file you want to upload. Default unit is inch.
Output Values
- File Name - The name of the uploaded file.
- 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
- Check if the upload file parameter is provided.
- If the file is provided, return the file name and file type.
- 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.