Improvement of "ASP No Component Upload" Algorithm

xiaoxiao2021-03-06  120

A few days ago to help friends FAINTBEAR to modify one "

ASP no component upload "code, gets a few experience, write here, perhaps it is a bit used.

I have not developed an ASP program, just a temporary newspaper Buddha's feet, modified the control statement, so there is no longer given the ASP code here, just explains the idea. (You'd better browse FAINTBEAR before watching this article "

This article is no longer narrative, the article has no components.

The general is this, a form of POST may be plus a plurality of texts in an FORM form.





---------------------------- 7D429871607FE

Content-disposition: form-data; name = "file1"; filename = "g: /Homepage.txt"

Content-Type: Text / Plain

Baoyu:

http://www.webuc.net

---------------------------- 7D429871607FE

Content-disposition: form-data; name = "id"

234523894

---------------------------- 7D429871607FE--

Content-disposition: form-data; Name = "name"

Faint Bear

---------------------------- 7D429871607FE--

Content-disposition: form-data; name = "friend"

Smile overce

---------------------------- 7D429871607FE--

Since File1 may be very large, such as ID, Name, Friend These are very many domains to be submitted, and File1, ID, Name, Friend's relative position is not determined (in the original written in the order of these entries), How can I better divide the stream?

My idea is: First, according to the entry, it is file1, id, name, Friend each; then, if it is a file type, then divide into several blocks according to its size. Basically this structure: --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

File1 ------------

NO.1 Block

----------------

No.2 Block

----------------

No. ..... .. block.. Block

----------------

----------------------------

id

----------------------------

Name

----------------------------

Friend

----------------------------

This is in order, and the problem of ensuring the clear structure of the structure, and the problem of large file upload.

转载请注明原文地址:https://www.9cbs.com/read-101543.html

New Post(0)