mirror of
https://gitee.com/mafgwo/stackedit
synced 2024-11-16 03:32:40 +08:00
自定义图床上传bugfix
This commit is contained in:
parent
1580f1c658
commit
8ec5bf9ec6
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user