The mystery of dynamic avatars

Recently, I saw a lot of users discussing dynamic profile pictures in the boiling point area, so IN a 414 attitude, I pressed Ctrl + T on a new page in the browser, typed in iiter. Cn, and hit Enter.






Dig friends navigation station

Analysis of the interface

Go to nuggets personal homepage – edit profile. F12 open the console, switch to Network, and then switch to XHR request. Click Upload to upload a normal profile picture.

XHR

  • The first is the user upload profile picture interface
  • The second is the update user information interface

Click the user profile picture upload interface. It is a Post request and the interface is https://cdn-ms.juejin.im/v1/upload? Bucket =gold-user-assets switch to Preview to see the data returned

Uploading a dynamic profile picture

Ok, let’s use this interface to test if we can upload.gif images. Open up Postman, create a new request, switch to POST request, copy and paste the interface for uploading your avatar, and switch the Body to form-data

key
file
file

.gif

Send
Cute (Demonic)

https

Updating User Information

Next, call the interface that updates the user data directly. Interface is below this cargo is still https://user-storage-api-ms.juejin.im/v1/updateUserInfo Post request, the Form Data, fill in the following parameters, head into now static head first to try.

Send



.gif



https
postman
value


Verify that the update is successful

Go back to the page and refresh 1.

eggs

Digg friends navigation site: iiter.cn (can you set up a browser home page to support it?)