forked from Gitlink/forgeplus-react
upload action修改
This commit is contained in:
parent
5c00e6fbea
commit
283180c7ec
|
@ -1,6 +1,6 @@
|
|||
import React, {useState, useCallback} from "react";
|
||||
import { Input, Select, Button, Form, message, Radio, Modal, Upload, Icon, Tooltip } from 'antd';
|
||||
import { appendFileSizeToUploadFileAll } from 'educoder';
|
||||
import { appendFileSizeToUploadFileAll, getUploadActionUrl } from 'educoder';
|
||||
import { Base64 } from 'js-base64';
|
||||
import {enrollCompetition, enrollUpdate, updateTemplate} from '../api';
|
||||
import {current_main_site_url} from '../fetch';
|
||||
|
@ -303,7 +303,7 @@ export default Form.create()((props) => {
|
|||
</a>:<Upload
|
||||
accept=".zip,.rar"
|
||||
// 开发时 action需要添加?debug=admin
|
||||
action={`${current_main_site_url}/api/attachments.json?debug=admin`}
|
||||
action={getUploadActionUrl}
|
||||
fileList={files}
|
||||
onChange={handleChange}
|
||||
onDownload={download}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { useState, useEffect } from "react";
|
||||
import {Prompt} from 'react-router-dom'
|
||||
import {Select, Button, Upload, Modal, Icon, message } from 'antd';
|
||||
import { appendFileSizeToUploadFileAll } from 'educoder';
|
||||
import { appendFileSizeToUploadFileAll, getUploadActionUrl } from 'educoder';
|
||||
import {current_main_site_url} from '../fetch.js';
|
||||
import {uploadCompetition} from '../api';
|
||||
import refer from "../image/refer.svg";
|
||||
|
@ -108,7 +108,7 @@ function Introduce({ form, showNotification, match, history, enrollStatus, curre
|
|||
<Upload
|
||||
accept=".zip,.rar,.tar"
|
||||
// 开发时 action需要添加?debug=admin
|
||||
action={`${current_main_site_url}/api/attachments.json?debug=admin`}
|
||||
action={getUploadActionUrl}
|
||||
fileList={files}
|
||||
onChange={handleChange}
|
||||
onDownload={download}
|
||||
|
|
Loading…
Reference in New Issue