Beispiel #1
0
 /// <summary>
 /// 获取文件锁信息
 /// </summary>
 /// <returns>文件锁信息</returns>
 public AutolockGetlockinfoRes AutolockGetlockinfoPost(string token)
 {
     try
     {
         EASAPIModel model = GetAPIModel(token);
         FileUploadDownloadService fileUploadService = new FileUploadDownloadServiceImpl();
         return(fileUploadService.AutolockGetlockinfoPost(model.DocId, APIInstanceManager.GetApiInstance(model.TokenId, model.Host)));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns>用户信息</returns>
        public UserGetRes UserGetPost(string token)
        {
            try
            {
                EASAPIModel model = GetAPIModel(token);

                FileUploadDownloadService fileUploadService = new FileUploadDownloadServiceImpl();
                return(fileUploadService.UserGetPost(APIInstanceManager.GetApiInstance(model.TokenId, model.Host)));
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Beispiel #3
0
        /// <summary>
        ///  上传文件到服务器
        /// </summary>
        /// <param name="filePath">本地文件路径</param>
        /// <param name="isNew">是否新建</param>
        public UploadRes FileSingleUpload(string filePath, bool isNew, string token)
        {
            // 调用接口
            try
            {
                EASAPIModel model = GetAPIModel(token);
                FileUploadDownloadService fileUploadService = new FileUploadDownloadServiceImpl();

                // 设置传参
                SingleUploadReq body = new SingleUploadReq();
                body.Docid    = model.DocId.Substring(0, model.DocId.LastIndexOf('/'));
                body.FilePath = filePath;
                body.Ondup    = isNew ? 2 : 3;

                return(fileUploadService.SingleUpload(body, APIInstanceManager.GetApiInstance(model.TokenId, model.Host)));
            }
            catch (Exception e)
            {
                throw e;
            }
        }