Summary of XY530 Web Page Integration of Jieyu Altimeter

Keywords: ASP.NET SDK IE

At the request of Party A, it is necessary to integrate the high-beat instrument into the B/S system. Several problems encountered in the integration process are summarized for reference.

1. The high-resolution camera sent by Party A was purchased from Taobao. The model is XY530. Its function is very simple and its imaging effect is very general. If there is no other requirement, you can try it.

PS, Jiyu's 400 clients and sisters have a good service attitude. They haven't finished work at 8 p.m. Praise one! __________

This shipper is so simple!

2. There are only drivers and software in the official CD-ROM, and there is no SDK development kit. Here is the latest http://pan.baidu.com/s/1c247XgG password: jmpb

Because integration is an ActiveX control on the web page, it only supports IE browsers, and only supports IE9 and above browsers. If the client is an XP system, don't count on it!

3. The server side in SDK is very rudimentary. It is not recommended to use it directly in the project. My project is. net. C# code is posted here.

[HttpPost]
        public ActionResult GPYUpload(string folderId)
        {
            string msgnull = "", msgconvert = "", msgex = "";
            bool flag = true;
            for (int i = 0; i < Request.Files.Count;i++ )
            {
                try
                {
                    if (Request.Files[i] == null || string.IsNullOrEmpty(Request.Files[i].FileName) || Request.Files[i].ContentLength == 0)
                    {
                        msgnull = "Some files have not been parsed to!";
                        flag = false;
                        continue;
                    }
                    string FileName = Path.GetFileName(Request.Files[i].FileName);
                    string userId = OperatorProvider.Provider.Current().UserId;
                    string fileGuid = Guid.NewGuid().ToString();
                    long filesize = Request.Files[i].ContentLength;
                    string FileEextension = Path.GetExtension(Request.Files[i].FileName);
                    string uploadDate = DateTime.Now.ToString("yyyyMMdd");
                    string virtualPath = string.Format("~/DocumentFile/{0}/{1}/{2}{3}", userId, uploadDate, fileGuid, FileEextension);
                    string fullFileName = this.Server.MapPath(virtualPath);
                    string path = Path.GetDirectoryName(fullFileName);
                    Directory.CreateDirectory(path);

                    if (!System.IO.File.Exists(fullFileName))
                    {
                        Request.Files[i].SaveAs(fullFileName);
                        FileInfoEntity fileInfoEntity = new FileInfoEntity();
                        fileInfoEntity.IsOnlineView = false;
                        fileInfoEntity.Create();
                        fileInfoEntity.FileId = fileGuid;
                        if (!string.IsNullOrEmpty(folderId))
                        {
                            fileInfoEntity.FolderId = folderId;
                        }
                        else
                        {
                            fileInfoEntity.FolderId = "0";
                        }
                        fileInfoEntity.FileName = FileName;// Request.Files[i].FileName;
                        fileInfoEntity.FilePath = virtualPath;
                        fileInfoEntity.FileSize = filesize.ToString();
                        fileInfoEntity.FileExtensions = FileEextension;
                        fileInfoEntity.FileType = FileEextension.Replace(".", "");

                        fileInfoBLL.SaveForm("", fileInfoEntity);
                    }

                }
                catch (Exception ex)
                {
                    msgex += ex.Message;
                    continue;
                }
            }
            if (flag && Request.Files.Count>0)
            {
                return Success("The upload was successful.");
            }
            else
            {
                return Content(msgnull + ";" + msgconvert + ";" + msgex);
            }
        }

4. IFrame is used in the project to nest each sub-page. When the SDK example is put into the system completely, the error is always reported, indicating that no method can be found. In fact, this is a big pit!

It's just that the X-UA-Compatible value is not set correctly.

In my pages, <meta http-equiv="X-UA-Compatible" content="IE=edge"> and in the SDK example, <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"> just change to the latter.

I'm sorry to say that the code of the parent page can't be changed (frame template). It's still invalid to set EmulateIE9 in the IFrame sub-page.

Some people say that Microsoft BUG is the Internet search material. The original link is as follows:

http://bbs.csdn.net/topics/390634956

I have to change to pop-up window mode, there is no way.

5, Tucao about Jieyu's SDK, the interface is too simple, there is too little room for operation. The tips in the upload process are too ugly and ugly, and there is no hook to execute its own method after completion, just a pop-up box!

ActiveX controls, however, store images on the client, and you can upload them yourself!

 

 

Generally speaking, it's still very simple! ___________

Posted by lostincoding on Thu, 18 Apr 2019 15:30:33 -0700