473,808 Members | 2,852 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1518
there is no way to do this without using seperate files

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

<jh****@mindspr ing.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.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****@mindspr ing.com> wrote in message
news:11******** *************@g 14g2000cwa.goog legroups.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****@mindspr ing.com> a écrit dans le message de
news:11******** *************@g 14g2000cwa.goog legroups.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
2508
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 records to check some validation before entire file is uploaded. (Files can be HUGE) Question - what about when the file is Zipped? Can I still upload the first 100K of the file and somehow unzip that portion of the file? Or
0
266
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
1578
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
1202
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
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10373
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6880
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5547
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.