473,414 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

I WANT to do a Partial File Upload

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

Nov 19 '05 #1
3 1493
there is no way to do this without using seperate files

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

<jh****@mindspring.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
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

Nov 19 '05 #2
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.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

<jh****@mindspring.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
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

Nov 19 '05 #3
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

--

<jh****@mindspring.com> a écrit dans le message de
news:11*********************@g14g2000cwa.googlegro ups.com...
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

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: johnnyh | last post by:
I am currently using ASP.Net / C# to partially upload the first 100K of a CSV file to programattically extract the header information for field mapping against our database and for a test sample of...
0
by: Daniel | last post by:
What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this?
1
by: Daniel | last post by:
What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this?
1
by: Daniel | last post by:
What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this?
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.