Signature
Parameters
Name of the file input field in the form
Return Value
Path to the temporary uploaded file, or NULL if no file was uploaded
Description
Theuploaded_file_path() function returns the path to a temporary file where the uploaded content is stored. This file is automatically deleted after the request completes, so you must process or persist it during the request.
Examples
Store as Data URL
Read and store file as data URL in database:Store as Text
Read uploaded text file:Save to Permanent Location
Use withpersist_uploaded_file():
Related Functions
- sqlpage.persist_uploaded_file() - Save uploaded files permanently
- sqlpage.uploaded_file_name() - Get original filename
- sqlpage.read_file_as_data_url() - Read file as data URL
- sqlpage.read_file_as_text() - Read file as text