About the entire Avatar Update issue (2)

Source: Internet
Author: User

This time I want to use the image upload download process (I really developed to really know the whole process or need time, rather than normal adjustment)

1. As before, you need to get the picture and upload it to the server

Note that you still need to delete the previously stored files locally, this can be resolved first (generate a local address based on the variable)

2. Then get the picture

First, the network address that the picture stores on the server is stored first

Then you need to generate a local address based on the ID of the member

Send a broadcast to the page where the editing information is received.

This unification is:

Get the picture file from memory first (set a mapping variable)

If it does not exist, it is obtained from a local file.

If not, get directly from the network, then save to the local file and the network cache, and then resend the same broadcast to get (in fact, this need to consider whether there are other)

3. Next is the adaptation ImageView (this process needs to crop the picture, good can refer to the code used before)

In fact, the whole process is not difficult, the key or some cache problems, not clear, there are some methods, use later, the cached image file buffer becomes null, this time can no longer use the file, so took the broadcast method, re-loaded again.

About the entire Avatar Update issue (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.