Re: Get images or binary files from web form

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu