CN112565464A - Method for uploading file custom bit sequence - Google Patents
Method for uploading file custom bit sequence Download PDFInfo
- Publication number
- CN112565464A CN112565464A CN202110087649.1A CN202110087649A CN112565464A CN 112565464 A CN112565464 A CN 112565464A CN 202110087649 A CN202110087649 A CN 202110087649A CN 112565464 A CN112565464 A CN 112565464A
- Authority
- CN
- China
- Prior art keywords
- uploading
- picture
- pictures
- task
- sequence
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 41
- 230000001960 triggered effect Effects 0.000 claims description 2
- 238000012544 monitoring process Methods 0.000 abstract description 3
- 238000013507 mapping Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention belongs to a method for uploading a file custom bit sequence, which is characterized by comprising the following steps of: when the pictures in the system file are selected during uploading, a monitor is used for monitoring the click operation of the DOM node of each picture, and the corresponding click sequence identifier is givenThe clicked picture is highlighted by CSS, and all sequence identifications form an array A [0,1, 2-. cndot.. a](ii) a Storing the selected pictures in a temporary console for previewing, and arranging the pictures from small to large according to the sequence identification of the pictures; after the pictures needing to be uploaded and the sequence are determined, starting to upload the task, simulating a Java queue by using JS, and monitoring whether the task queue is uploading the task or not by using the listener in the Java queue; and S4, after all the selected pictures are uploaded successfully, returning to the completion state, and ending the task. By passingThe method disclosed by the invention can automatically select the uploading sequence of the pictures and the files and support the previewing and uploading of the files.
Description
Technical Field
The invention belongs to the technical field of communication, particularly relates to a data transmission technology, and particularly relates to a method for uploading a file custom bit sequence.
Background
In the form background, when a plurality of pictures need to be uploaded in a form, the background can default to upload according to the arrangement sequence in the system folder, and in many cases, the sequence is not the sequence which is required to be displayed, the uploading sequence of the pictures or files cannot be defined, and when the sizes of the uploaded pictures are different greatly, the uploading of the pictures which are smaller is easily completed first, so that errors in the sequence are caused. This results in a wrong sequence of the files during the file uploading process, which affects the background data of the form.
Disclosure of Invention
In order to make up the defects of the prior art, the invention provides a file custom bit sequence uploading method capable of customizing an uploading sequence.
The method for uploading the file custom bit sequence is described,
a method for uploading a file custom bit sequence is characterized by comprising the following steps:
s1, when selecting the picture in the system file during uploading, using the monitor to monitor the click operation of the DOM node of each picture, and giving the corresponding click sequence identificationThe clicked picture is highlighted by CSS, and all sequence identifications form an array A [0,1, 2-. cndot.. a];
S2, storing the selected pictures in a temporary console for previewing, and arranging the pictures from small to large according to the sequence identification of the pictures;
s3, after the pictures to be uploaded and the sequence are determined, the task is uploaded, JS is used for simulating a Java queue, and the Java queue monitors whether the task queue is uploading the task or not by the monitor;
s31, if the queue is uploading, pushing the uploading task to the tail of the queue, and starting the task when all the previous tasks are finished; if there is no task in progress, pass the corner markAndobtaining picture resources according to the mapping relation of the image resources and the corner marksUploading from small to large in series;
and S4, after all the selected pictures are uploaded successfully, returning to the completion state, and ending the task.
The method for uploading the files in the user-defined bit sequence is characterized in that the step S1 includes the step S11 that each picture is provided with a corresponding pictureSaidIs a parameter in URL format, of all picturesForm an array UID [0,1, 2.. cndot.]By passingAndto map to a uniquely corresponding picture file.
The method for uploading the file custom bit sequence is characterized in that when the step S2 is performed, the picture sequence and the picture file can be edited for the second time, and the steps comprise deleting the selected picture and adding the picture.
The method for uploading the file custom bit sequence is characterized in that the console is an array, the default state of the console is null, the pictures are sequentially pushed into the array according to the selected order, and the uploading order is determined according to the order of the pictures in the array.
The file self-defining bitMethod for sequential uploading, characterized in that said step S3 further comprises the step S32 of assumingIn the process of uploading, the information is transmitted to the user,waiting for the waiting; when in useAfter uploading is completed, returnUpload task completion status ofAnd will beWhen Shift is dropped, the monitor is triggered, and the task queue is in an idle state at the moment, and the process is startedAnd uploading.
The method for uploading the file custom bit sequence is characterized in that the Shift is to remove a head element from a task list.
The method for uploading the file in the user-defined bit sequence is characterized in that the selected picture is deleted to obtain the picture file to be removedAndwill beAndmapped picture textDeleting the part from the console, traversing the console, and if the picture isValue less thanThen, thenThe value is unchanged; if the value is greater thanThe value is then decremented by 1.
The file custom bit sequence uploading method is characterized in that the traversal is performed on a selected picture, and whether the picture is selected or not is judged firstly.
The method for uploading the file custom bit sequence is characterized in that the picture adding is to add a picture, and the sequence identifier of the picture is equal to the maximumThe value is increased by 1.
The method for uploading the files in the user-defined bit sequence is characterized in that the serial uploading in the step S31 comprises a parallel uploading mode realized by using promise, and when an uploading completion state is returnedIn time, the picture is finished according to uploadingFind its corner markAnd placing the picture resources at the set positions according to the corner marks.
Compared with the prior art, the invention has the following advantages:
by the method disclosed by the invention, the uploading sequence of the pictures and the files can be selected independently, and the previewing and the uploading of the files are supported. The method and the device can reduce error uploading, and can avoid the situation that blank pictures appear at positions which are not uploaded well when the uploading task of only part of pictures is completed.
Drawings
Fig. 1 is a flowchart of a method for uploading a custom bit sequence according to the present invention.
Detailed Description
In the description of the present invention, it is to be understood that the terms "one end", "the other end", "outside", "upper", "inside", "horizontal", "coaxial", "central", "end", "length", "outer end", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the present invention.
The invention will be further explained with reference to the drawings.
A method for uploading a file custom bit sequence comprises the following steps:
the first step is as follows: when selecting the pictures in the system file during uploading, using a monitor to monitor the click operation of the DOM node of each picture, and giving a corresponding click sequence identifier. The picture that heard the click is highlighted using CSS. All sequence identifiers form an array A [0,1, 2.. cndot.. cndot.. a]. And each picture has its own,Is a parameter in the form of a URL, allForming an array. Tong (Chinese character of 'tong')For treatingAndit can be mapped to the only one picture file. The listener is an operation of capturing a click picture by registering a listening event for a picture parent node through addEventListener (API method of DOM).
The second step is that: storing the selected picture files in a temporary control console, wherein the control console is an array, the default state of the control console is null, the pictures can be sequentially pushed into the array according to the selected order, and the uploading order is determined according to the order of the pictures in the array. Then previewing according to the pictureArranged from small to large. At this time, the picture sequence and the picture file can be edited secondarily, such as deleting the selected picture, adding the picture, and the like.
The third step: and after the pictures to be uploaded and the sequence are determined, starting the uploading task. Using JS to simulate a Java queue: and monitoring whether the task queue has an ongoing uploading task or not by using the monitor.
If the queue is carrying out the uploading task, pushing the uploading task to the tail of the queue, and starting the task after all the previous tasks are finished; if there is no task in progress, pass the corner markAndobtaining picture resources according to the mapping relation of the image resources and the corner marksUploading serially from small to large.
Suppose thatIn the process of uploading, the information is transmitted to the user,waiting for the waiting; when in useAfter uploading is completed, returnUpload task completion status ofAnd will beShift-off, i.e. removal of the head element from the task list, triggers the listener, while the task queue is idle, and beginsAnd uploading.
The fourth step: and after all the selected pictures are uploaded successfully, returning to the completion state, and ending the task.
The second step of deleting the selected picture is to acquire the picture file to be deletedAndwill beAndthe mapped picture file is deleted from the console. And traversing the console, wherein the traversing is to traverse the selected picture, and firstly judging whether the picture is selected. If the picture isValue less thanThen, thenThe value is unchanged; if the value is greater thanThe value is then decremented by 1.
The process of adding pictures is to add a picture with the sequence identification equal to the maximumThe value is increased by 1.
In another embodiment, the serial upload mode in the third step may be changed to a parallel upload mode implemented by promise. If parallel uploading is performed according to the serial uploading step, when the size difference of the uploaded pictures is large, uploading of the pictures which are small is easily completed first, and thus errors in sequence are caused.
So when the parallel upload is made, the upload completion status is returnedWhen the picture is not returned to the first completion state in the first order, the picture is completed according to the uploadingFind its corner markAnd placing the picture resources at the set positions according to the corner marks.
By the method disclosed by the invention, the uploading sequence of the pictures and the files can be selected independently, and the previewing and the uploading of the files are supported. The method and the device can reduce error uploading, and can avoid the situation that blank pictures appear at positions which are not uploaded well when the uploading task of only part of pictures is completed.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A method for uploading a file custom bit sequence is characterized by comprising the following steps:
s1, when selecting the picture in the system file during uploading, using the monitor to monitor the click operation of the DOM node of each picture, and giving the corresponding click sequence identificationThe clicked picture is highlighted by CSS, and all sequence identifications form an array A [0,1, 2-. cndot.. a];
S2, storing the selected pictures in a temporary console for previewing, and arranging the pictures from small to large according to the sequence identification of the pictures;
s3, after the pictures to be uploaded and the sequence are determined, the task is uploaded, JS is used for simulating a Java queue, and the Java queue monitors whether the task queue is uploading the task or not by the monitor;
s31, if the queue is uploading, pushing the uploading task to the tail of the queue, and starting the task when all the previous tasks are finished; if there is no task in progress, pass the corner markAndis mapped toObtains picture resources according to the corner marksUploading from small to large in series;
and S4, after all the selected pictures are uploaded successfully, returning to the completion state, and ending the task.
2. The method for uploading customized bit sequence of file according to claim 1, wherein said step S1 comprises step S11 each picture is provided with a corresponding bit sequenceSaidIs a parameter in URL format, of all picturesForm an array UID [0,1, 2.. cndot.]By passingAndto map to a unique corresponding picture file;
the listener captures the click picture by registering the listen event for the picture parent node by addEventListener.
3. The method for uploading customized bit sequence of file according to claim 1, wherein in step S2, the picture sequence and the picture file can be edited twice, including deleting selected pictures and adding pictures.
4. The method according to claim 1 or 3, wherein the console is an array, the default state of the console is null, the pictures are sequentially pushed into the array according to the selected order, and the uploading order is determined by the order of the pictures in the array.
5. The method for uploading custom bit sequence of file according to claim 1, wherein said step S3 further comprises the step S32 assuming thatIn the process of uploading, the information is transmitted to the user,waiting for the waiting; when in useAfter uploading is completed, returnUpload task completion status ofAnd will beWhen Shift is dropped, the monitor is triggered, and the task queue is in an idle state at the moment, and the process is startedAnd uploading.
6. The method for uploading custom bit sequence of file according to claim 5, wherein said Shift is to remove the head element from the task list.
7. The method for uploading files in custom bit sequence according to claim 3, wherein deleting the selected picture is to acquire the picture file to be deletedAndwill beAnddeleting the mapped picture file from the console, traversing the console, and if the picture is the picture, deleting the mapped picture file from the consoleValue less thanThen, thenThe value is unchanged; if the value is greater thanThe value is then decremented by 1.
8. The method for uploading customized bit sequence of file according to claim 7, wherein said traversal is performed on a selected picture, and it is first determined whether the picture is selected.
10. The file customization method of claim 1The method for sense order uploading is characterized in that the serial uploading in the step S31 includes implementing a parallel uploading mode by using a promise, and when an uploading completion state is returnedIn time, the picture is finished according to uploadingFind its corner markAnd placing the picture resources at the set positions according to the corner marks.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110087649.1A CN112565464A (en) | 2021-01-22 | 2021-01-22 | Method for uploading file custom bit sequence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110087649.1A CN112565464A (en) | 2021-01-22 | 2021-01-22 | Method for uploading file custom bit sequence |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112565464A true CN112565464A (en) | 2021-03-26 |
Family
ID=75035728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110087649.1A Pending CN112565464A (en) | 2021-01-22 | 2021-01-22 | Method for uploading file custom bit sequence |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112565464A (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103634352A (en) * | 2012-08-24 | 2014-03-12 | 腾讯科技(深圳)有限公司 | Picture upload method and system and client |
CN103870490A (en) * | 2012-12-12 | 2014-06-18 | 腾讯科技(武汉)有限公司 | File uploading method and device |
US20140289367A1 (en) * | 2013-03-21 | 2014-09-25 | Oracle International Corporation | Enable uploading and submitting multiple files |
CN104219270A (en) * | 2013-06-05 | 2014-12-17 | 北京齐尔布莱特科技有限公司 | Method for uploading multiple images from client to server rapidly and efficiently |
CN104281590A (en) * | 2013-07-03 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Picture uploading method, device, application interactive platform, terminal and system |
CN104333604A (en) * | 2014-11-18 | 2015-02-04 | 中国建设银行股份有限公司 | Picture batch uploading method, uploading information feedback method, related device and system |
CN104881206A (en) * | 2015-05-15 | 2015-09-02 | 百度在线网络技术(北京)有限公司 | File selecting processing method and device |
CN105162863A (en) * | 2015-09-01 | 2015-12-16 | 北京皮尔布莱尼软件有限公司 | Picture uploading device and method and computing equipment |
CN105468710A (en) * | 2015-11-19 | 2016-04-06 | 中国建设银行股份有限公司 | Picture processing method and system applied in high concurrency scene |
CN105532013A (en) * | 2013-07-12 | 2016-04-27 | 佳能株式会社 | Adaptive data streaming method with push messages control |
CN107797717A (en) * | 2016-09-02 | 2018-03-13 | 阿里巴巴集团控股有限公司 | Method for pushing, display methods, client device and data handling system |
CN109600644A (en) * | 2017-09-30 | 2019-04-09 | 华为终端(东莞)有限公司 | A kind of method and relevant device, computer program product of RTV remote television browser |
CN110428360A (en) * | 2019-07-05 | 2019-11-08 | 中国平安财产保险股份有限公司 | Automobile image beautification method, equipment, storage medium and device |
CN110602163A (en) * | 2019-08-07 | 2019-12-20 | 阿里巴巴集团控股有限公司 | File uploading method and device |
CN111367449A (en) * | 2020-02-28 | 2020-07-03 | 深圳市腾讯信息技术有限公司 | Picture processing method and device, computer equipment and storage medium |
-
2021
- 2021-01-22 CN CN202110087649.1A patent/CN112565464A/en active Pending
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103634352A (en) * | 2012-08-24 | 2014-03-12 | 腾讯科技(深圳)有限公司 | Picture upload method and system and client |
CN103870490A (en) * | 2012-12-12 | 2014-06-18 | 腾讯科技(武汉)有限公司 | File uploading method and device |
US20140289367A1 (en) * | 2013-03-21 | 2014-09-25 | Oracle International Corporation | Enable uploading and submitting multiple files |
CN104219270A (en) * | 2013-06-05 | 2014-12-17 | 北京齐尔布莱特科技有限公司 | Method for uploading multiple images from client to server rapidly and efficiently |
CN104281590A (en) * | 2013-07-03 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Picture uploading method, device, application interactive platform, terminal and system |
CN105532013A (en) * | 2013-07-12 | 2016-04-27 | 佳能株式会社 | Adaptive data streaming method with push messages control |
CN104333604A (en) * | 2014-11-18 | 2015-02-04 | 中国建设银行股份有限公司 | Picture batch uploading method, uploading information feedback method, related device and system |
CN104881206A (en) * | 2015-05-15 | 2015-09-02 | 百度在线网络技术(北京)有限公司 | File selecting processing method and device |
CN105162863A (en) * | 2015-09-01 | 2015-12-16 | 北京皮尔布莱尼软件有限公司 | Picture uploading device and method and computing equipment |
CN105468710A (en) * | 2015-11-19 | 2016-04-06 | 中国建设银行股份有限公司 | Picture processing method and system applied in high concurrency scene |
CN107797717A (en) * | 2016-09-02 | 2018-03-13 | 阿里巴巴集团控股有限公司 | Method for pushing, display methods, client device and data handling system |
CN109600644A (en) * | 2017-09-30 | 2019-04-09 | 华为终端(东莞)有限公司 | A kind of method and relevant device, computer program product of RTV remote television browser |
CN110428360A (en) * | 2019-07-05 | 2019-11-08 | 中国平安财产保险股份有限公司 | Automobile image beautification method, equipment, storage medium and device |
CN110602163A (en) * | 2019-08-07 | 2019-12-20 | 阿里巴巴集团控股有限公司 | File uploading method and device |
CN111367449A (en) * | 2020-02-28 | 2020-07-03 | 深圳市腾讯信息技术有限公司 | Picture processing method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI550417B (en) | Data migration method and device | |
US8806097B2 (en) | Data reproducing apparatus, content management method, program, and storage medium | |
JP5344460B2 (en) | EDITING DEVICE, EDITING PROGRAM, AND EDITING METHOD | |
US9152654B2 (en) | System and method for managing images over a network | |
JP2018110435A (en) | Video editing method | |
CN100543728C (en) | Use the browser file upload | |
JP2001268490A (en) | Method for relating image and position data | |
EP3528199A1 (en) | Method and apparatus for collecting content | |
JP2007534009A (en) | System and method for music synchronization in a mobile communication device | |
CN104503864A (en) | Method and device for file backup based on local area network | |
US20020135685A1 (en) | Digital camera device | |
WO2017016116A1 (en) | Playback system group playback control method and terminal | |
JP5571944B2 (en) | Imaging apparatus, control method therefor, and program | |
US7576773B2 (en) | Direct recording device and direct recording method | |
CN112565464A (en) | Method for uploading file custom bit sequence | |
CN107609197B (en) | A kind of method of data synchronization, data synchronization unit and mobile terminal | |
US20150293914A1 (en) | Multimedia information processing method, multimedia apparatus, and multimedia network system | |
CN107577822A (en) | A kind of method of data synchronization, data synchronization unit and mobile terminal | |
JP5075723B2 (en) | Metadata editing system, metadata editing program, and metadata editing method | |
JP2004080538A (en) | Apparatus, system and method for image communication | |
CN111966605A (en) | Automatic resource retrieval method, system and storage medium for Redfish | |
JP4302424B2 (en) | Direct recording apparatus and direct recording method | |
JP5398038B2 (en) | Automatic search transfer device and automatic search transfer system | |
CN112596752B (en) | Internet of things method and system for electronic evidence obtaining equipment | |
CN103425717B (en) | Method for prepositive browsing and browsing data customization and digital media device thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210326 |
|
RJ01 | Rejection of invention patent application after publication |