View Source sb_file_upload_handler (simple_bridge v2.3.1)

Handler for file uploads

Link to this section Summary

Functions

Getting the File data

Getting the temporary file name

File Upload Handler "memory"

Starting a new file

Receiving new appending data

File Upload Handler "temporary_file"

Link to this section Functions

Link to this function

complete_file(FileUploadHandlerState)

View Source

Completes the File

Completes the File and returns the new File upload handler state.
Link to this function

get_data(FileUploadHandlerState)

View Source

Getting the File data

This is empty for "temporary_file" handler and set by the "memory" handler.
Link to this function

get_tempfile(FileUploadHandlerState)

View Source

Getting the temporary file name

This is empty for "memory" handler and set by the "temporary_file" handler.

File Upload Handler "memory"

the memory file upload handler is keeping the file in the memory while the file is smaller than get_max_memory_size/0. When file is bigger this handler transforms to "temporary_file" handler.

Starting a new file

Starts a new file with an optional File upload Handler and a FileName. When no File upload handler is given the memory file handler is set as default.
Link to this function

new_file(FileUploadHandler, FileName)

View Source
Link to this function

receive_data(FileUploadHandlerState, Data)

View Source

Receiving new appending data

Receives a "chunk" of data from the file upload and returns the new File upload handler state.
Link to this function

temporary_file_handler()

View Source

File Upload Handler "temporary_file"

the temporary_file file upload handler is writing the uploaded files to a temporary file on the hard disk.