Re: Get images or binary files from web form
- Posted by jmduro Aug 10, 2022
- 2236 views
This is the way I do:
std_input = get_bytes(0, to_integer(content_size)) sequence boundary = {} for n = 1 to length(std_input) do if (std_input[n] = '\n') and (std_input[n+1] = '\n') then sequence s = std_input[1..n-1] boundary = split(s, '\n') std_input = remove(std_input, 1, n+1) exit end if end for write_file(fname, std_input)
Within the boundary part you can extract the filename.
Jean-Marc