Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
OffcnIMSDKiOS
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
opensource
OffcnIMSDKiOS
Commits
11cf04da
Commit
11cf04da
authored
Aug 24, 2020
by
zhangyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传类型区分
parent
0187e396
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
4 deletions
+36
-4
OffcnIMSDKiOS.m
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
+36
-4
No files found.
OffcnIMSDKiOS/ExposedInterface-(外放接口)/OffcnIMSDKiOS.m
View file @
11cf04da
//
//
...
...
@@ -12,6 +12,9 @@
#import "SDGeneralDefine.h"
#import "OffcnNetworkExecutor.h"
#import "OffcnUploadManager.h"
#import "SDGeneralTool.h"
#import "DataSafe.h"
#import "NSString+MD5.h"
@interface
OffcnIMSDKiOS
()
...
...
@@ -119,13 +122,42 @@ static OffcnIMSDKiOS *liveTelecastSDK;
finished
(
success
,
nil
,
baseResponse
.
errorMessage
);
}];
}
else
{
if
(
!
filePath
||
!
filePath
.
length
)
{
filePath
=
@""
;
}
[[
OffcnUploadManager
defaultService
]
uploadToQNFilePath
:
filePath
Finished
:
^
(
BOOL
success
,
id
_Nonnull
response
,
NSString
*
_Nonnull
errorMessage
)
{
if
(
success
)
{
NSString
*
response
Str
=
@""
;
NSString
*
url
Str
=
@""
;
if
(
response
)
{
responseStr
=
[
NSString
stringWithFormat
:
@"%@"
,
response
];
urlStr
=
[
NSString
stringWithFormat
:
@"%@"
,
response
];
}
NSMutableDictionary
*
dataDic
=
[
NSMutableDictionary
dictionary
];
if
(
msg_type
==
OffcnSDKMsgTypePicture
)
{
NSString
*
nameStr
=
[
NSString
stringWithFormat
:
@"%@%@"
,
msg_toID
,[
SDGeneralTool
getNowSSSTimeTimestamp
]];
NSString
*
md5Str
=
[
urlStr
md5Encrypt
];
[
dataDic
setObjectOnSafe
:
urlStr
forKey
:
@"url"
];
[
dataDic
setObjectOnSafe
:
nameStr
forKey
:
@"name"
];
[
dataDic
setObjectOnSafe
:
md5Str
forKey
:
@"md5"
];
[
dataDic
setObjectOnSafe
:
@""
forKey
:
@"thumb_url"
];
[
dataDic
setObjectOnSafe
:
@""
forKey
:
@"ext"
];
[
dataDic
setObjectOnSafe
:
@""
forKey
:
@"w"
];
[
dataDic
setObjectOnSafe
:
@""
forKey
:
@"h"
];
[
dataDic
setObjectOnSafe
:
@""
forKey
:
@"size"
];
}
else
if
(
msg_type
==
OffcnSDKMsgTypeAudio
){
}
else
if
(
msg_type
==
OffcnSDKMsgTypeVideo
){
}
else
if
(
msg_type
==
OffcnSDKMsgTypeFile
){
}
NSMutableDictionary
*
dataDic
=
[
NSMutableDictionary
dictionaryWithObject
:
responseStr
forKey
:
@"url"
];
[
OffcnNetworkExecutor
requestSendMsgWithMsg_fromID
:
msg_fromID
msg_toID
:
msg_toID
msg_type
:
msg_type
msg
:
dataDic
Finished
:^
(
BOOL
success
,
id
response
,
BaseResponse
*
baseResponse
)
{
finished
(
success
,
nil
,
baseResponse
.
errorMessage
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment