I WANT to do a Partial File Upload

J

jhanzl

All -

I am looking into a way of uploading just the first portion of a large
(> 100M) .csv (text) file to the server. Ultimately what I want to do
is read the first line of the .csv file, which has the column headers
for the file for field mapping to a server-side database WITHOUT
actually having to upload the entire file to the server. The files are
simply too large to have to wait for the upload to complete before
proceeding to the next step of column validation / mapping.

Any thoughts? Is there a way to, say, upload a fixed number of bytes
then to parse through them to recreate the beginning of the text file
at the server? If I was to upload, dunno - 50K or so - and then somehow
stop the transfer, could I maybe iterate through the bytes to pull out
the header (maybe looking for the first instance of the CrLf bytes)

Not married to any particular technology, but it will have to work on
the common browsers and there can't be any install on a client computer
(purely web)

Regards,

JohnnyH
 
J

John Timney \(ASP.NET MVP\)

there is no way to do this without using seperate files

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
K

Ken Dopierala Jr.

Hi Johnny,

It would take a lot of scewing around to even come up with a hack for this.
I think your best bet it posting a few pictures with step by step
instructions showing your clients how to open the file in Word Pad, copy the
first line, and then paste it into a textbox. Not that much more difficult
than navigating their hard drives to find the file in the first place. You
could also just have them open IE and drag the file onto IE. The only
problem with that is if they have Excel installed and the extension is .csv
then IE will want to launch Excel so you'll probably need to stick to Word
Pad. Good luck! Ken.
 
P

Patrice

You can't. The best you can do with these requirements would be to see if it
could be possible to create only the needed lines in the CSV file...

Patrice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top