In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of how to upload the picture message to the file server, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to upload picture messages to the file server. Let's take a look.
We use Rongyun to develop projects, but we have a need not to upload pictures to Rongyun's server, but to our own server. So I consulted with technical support.
We are told that there is an interface method that can fully meet our needs.
ImageMessage imageMessage = ImageMessage.obtain (Uri.parse (FILEPATH), Uri.parse (FILEPATH)); configSendMessage (imageMessage); Message message = Message.obtain (mTargetId,mConversationType,imageMessage) RongIM.getInstance () .sendImageMessage (message, "pushcontent", "pushdata", new RongIMClient.SendImageMessageWithUploadListenerCallback () {@ Override public void onAttached (Message message, RongIMClient.UploadImageStatusListener watcher) {/ / here is the logic for uploading images. The image path can be obtained through message. / / watcher this parameter is mainly used to synchronize your upload status to sdk. This allows us to use the default logic within sdk, including the interface. } @ Override public void onError (Message message, RongIMClient.ErrorCode code) {} @ Override public void onSuccess (Message message) {} @ Override public void onProgress (Message message) Int progress) {}})
In this way, we can continue to use IMkit's interface and other logic, just write our upload logic in onAttached and synchronize the progress, success or failure status of watcher upload to sdk.
This is the end of the article on "how to upload picture messages to the file server". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to upload picture messages to the file server". If you want to learn more, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.