add file open
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user