自定义图床上传bugfix

This commit is contained in:
xiaoqi.cxq 2022-07-10 11:48:28 +08:00
parent 1580f1c658
commit 8ec5bf9ec6
2 changed files with 2 additions and 3 deletions

View File

@ -6,8 +6,7 @@ WORKDIR /opt/stackedit
COPY package*json /opt/stackedit/
COPY gulpfile.js /opt/stackedit/
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
RUN git config --global http.sslVerify false && npm set strict-ssl false && npm install --unsafe-perm \
RUN npm install --unsafe-perm \
&& npm cache clean --force
COPY . /opt/stackedit
ENV NODE_ENV production

View File

@ -46,7 +46,7 @@ export default {
const newFileName = `${md5(await utils.encodeFiletoBase64(file))}.${file.type.split('/')[1]}`;
const newfile = new File([file], newFileName, { type: file.type });
const headers = token.customHeaders || {};
const formData = token.formData || {};
const formData = token.customParams || {};
formData[token.fileParamName] = newfile;
const { body } = await networkSvc.request({
method: 'POST',