Automatic uploading files in the web environment to database implementation

zhaozj2021-02-16  48

Overview This article explains an example of automatic uploading files using the Office Star Control, using this method without selecting a file step, you can implement the search for saving files in a web environment in a web environment. Introduction To get upload function in the HTML page, we can use the form:

Method = "post"> This scheme has many restrictions on the client and server. First, we must use the POST method because the GET method cannot handle such form data. Also, there is no way to trigger a POST action without using a form. After sending data to the form handler, the browser will load the handler as a new page, and then the user will see a page conversion process that does not expect. The uploading scheme in the office star control needs to follow the steps below: Client: Save the document edited by the Office Star Control to the WEB Server server side by using the HTTP protocol to use the HTTP protocol: read from the Request object The uploaded binary document reads binary data and stores in the BLOB field of the database. Using Office Star Controls can implement graphic mixing and word processing feature with the Word function in the web environment, but how to save the edited document to the server side? The above scheme seems to have no new things. According to the description, the value value of the File control is read-only, and there must be a selection document to manually click on the upload button. Is that right? First introduce two office stars control interface methods: 1. SaveTEMPFILE (STR FileName) Save the document edited by Office Star Control to the local formation of a temporary file, the parameter filename is the file name of the temporary file. This method returns a parameter that indicates the absolute path of the temporary file. Example: SaveTETEMPFILE ("abc.ost") 2. UPLOADFILE (STR FilePath, Str operatorfile) Upload local specified files to the server side, parameter filepath is the absolute path of local to upload files, operatorfile is used to receive upload file streams for the server. The file name. This method returns a parameter and prompts whether it is successful during the operation. Example: UPLOADFILE ("C: /ABC.OST", "http://www.oapro.com/save.asp") See here, I believe that you already understand that the office star control has provided an interface method, which will be specified The file is automatically uploaded.

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

New Post(0)