Mercurial Hosting > luan
comparison website/src/examples/upload-and-email.luan @ 1152:21d157b153fe
change http parameters interface
| author | Franklin Schmidt <fschmidt@gmail.com> | 
|---|---|
| date | Sun, 04 Feb 2018 19:25:12 -0700 | 
| parents | ca169567ce07 | 
| children | 49cf706c326a | 
   comparison
  equal
  deleted
  inserted
  replaced
| 1151:dbb3cb906482 | 1152:21d157b153fe | 
|---|---|
| 36 <% | 36 <% | 
| 37 end | 37 end | 
| 38 | 38 | 
| 39 return function() | 39 return function() | 
| 40 Io.stdout = Http.response.text_writer() | 40 Io.stdout = Http.response.text_writer() | 
| 41 local email = Http.request.parameter.email | 41 local email = Http.request.parameters.email | 
| 42 if email == nil then | 42 if email == nil then | 
| 43 form() | 43 form() | 
| 44 else | 44 else | 
| 45 local file = Http.request.parameter.file | 45 local file = Http.request.parameters.file | 
| 46 send{ | 46 send{ | 
| 47 from = "smtp@luanhost.com"; | 47 from = "smtp@luanhost.com"; | 
| 48 to = email; | 48 to = email; | 
| 49 subject = "Upload and Email"; | 49 subject = "Upload and Email"; | 
| 50 body = "file should be attached"; | 50 body = "file should be attached"; | 
