Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 856fc3f

Browse files
committedFeb 15, 2021
Fix unsupported features
1 parent 69a92fc commit 856fc3f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎src/api/updateAvatar.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import { customAlphabet } from 'nanoid'
33

44
import agent from '../structures/agent'
55

6+
const random = customAlphabet('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ', 16)
7+
68
const updateAvatar = async (profile, buffer) => {
79
'use strict'
810

911
const form = new FormData()
10-
const boundary = 'Boundary+' + customAlphabet('1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ', 16)
12+
const boundary = 'Boundary+' + random()
1113

12-
form.setBoundary(boundary)
14+
form._boundary = boundary // NOTE: `form.setBoundary` isn't implemented, yet.
1315
form.append('file', buffer, {
1416
// NOTE: I recommend you not to change below to make sure you're not in a third party client.
1517
/*

0 commit comments

Comments
 (0)
This repository has been archived.