Domanda

Step 1 - Select txt file with kendo upload

(either upload it to a database at this stage or to app_data folder to be deleted later or another method)

Step 2 - Extract data from the txt file

(? depending on step 1 I would select the file I uploaded or is in app_data or ... then put it through a file steam or something to grab all the text inside)

Step 3 - Assign extracted data to a table model to record back to a database

I should only be dealing with a single file at a time which I would also wonder if I can restrict kendo upload to allow only single files per upload if it's even needed for me to upload the file.

È stato utile?

Soluzione

The Kendo Music Store sample app has an example of an ASP.NET WebAPI controller reading a posted file (an image in this case, but file contents doesn't matter) and saving it to the file system: ImagesController.cs

You could do something similar; read the file contents off the ASP.NET request, and do whatever processing you want.

The HTML and Javascript that set up the Kendo upload widget is in: storemanager-index.js

And finally a little bit of documentation from the Kendo Music Store tutorial docs: Album Art Upload With The Kendo Upload Widget

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top