NetTalk Central

Author Topic: Webserver - Upload and Process a CSV File  (Read 1389 times)

gavinwebb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Webserver - Upload and Process a CSV File
« on: February 13, 2012, 10:49:30 AM »
From my web app I want the user to be able to upload a CSV file and then  for my program to process this file (will result in records being inserted into the database).

I have created a memory form with a file upload field.  When I run it I can see how it then opens a file select box - but then what?

What doe I need to do next - somehow it needs to be told to upload to some location on the server I guess.  Then when that's done I guess the process (which I can easily write) needs to be triggered.  How do I trigger this?  How do I know when it's done?

I'm happy to look at examples or documentation but can't seem to find anything (that makes sense to em anyway).

Thanks

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Webserver - Upload and Process a CSV File
« Reply #1 on: February 13, 2012, 02:39:17 PM »
Look at the file upload example. It shows how to rename the incoming file and place it in a different folder. It is after this point you can then process the file in the web handler.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11193
    • View Profile
Re: Webserver - Upload and Process a CSV File
« Reply #2 on: February 13, 2012, 11:13:56 PM »
I've also tweaked the File upload example in 6.19 to show how to create thumbnails of images when the file arrives, using Clarion FreeImage. This is an often-asked question. In your case you can do the work in the WebHandler, or in the Form itself - the example shows where to embed in both cases (in 6.19).

cheers
Bruce