add file open

This commit is contained in:
2020-08-07 22:40:04 +08:00
parent c1e3f992aa
commit f9bedd2c62
115 changed files with 9835 additions and 1096 deletions

View File

@@ -114,14 +114,14 @@ end
-- 上传头像
NetProto.uploadUserHeadIcon = function(path, finishCallback)
NetProto._uploadFile("updateUserImg", path, "", finishCallback)
NetProto._uploadFile("updateUserImg", path, "", MyUtl.CompressImage(path, 512), finishCallback)
end
NetProto.uploadFile = function(path, uploadPath, finishCallback)
NetProto._uploadFile("uploadFile", path, uploadPath, finishCallback)
NetProto._uploadFile("uploadFile", path, uploadPath, File.ReadAllBytes(path), finishCallback)
end
NetProto._uploadFile = function(methord, path, uploadPath, finishCallback)
NetProto._uploadFile = function(methord, path, uploadPath, bytes, finishCallback)
local params = {
operator = NetProto.loginNo,
uploadPath = uploadPath
@@ -134,7 +134,7 @@ NetProto._uploadFile = function(methord, path, uploadPath, finishCallback)
NetProto.httpHeader,
"uploadFile",
Path.GetFileName(path),
File.ReadAllBytes(path),
bytes,
CLAssetType.text,
function(content, orgs)
content = json.decode(content)