mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
fix upload
This commit is contained in:
parent
a1680f1fef
commit
c0bdc8f104
@ -7,7 +7,7 @@ import UploadButton from "components/UploadButton"
|
|||||||
import { Icons } from "components/Icons"
|
import { Icons } from "components/Icons"
|
||||||
|
|
||||||
import PlaylistModel from "models/playlists"
|
import PlaylistModel from "models/playlists"
|
||||||
import UploadModel from "models/upload"
|
import FilesModel from "models/files"
|
||||||
|
|
||||||
import "./index.less"
|
import "./index.less"
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ export default class PlaylistCreator extends React.Component {
|
|||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
// upload the file
|
// upload the file
|
||||||
UploadModel.uploadFile(file).then((response) => {
|
FilesModel.uploadFile(file).then((response) => {
|
||||||
// update the file url in the track info
|
// update the file url in the track info
|
||||||
const file = this.state.trackList.find((file) => file.uid === uid)
|
const file = this.state.trackList.find((file) => file.uid === uid)
|
||||||
|
|
||||||
@ -282,7 +282,7 @@ export default class PlaylistCreator extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleUpload = async (req) => {
|
handleUpload = async (req) => {
|
||||||
const response = await UploadModel.uploadFile(req.file).catch((error) => {
|
const response = await FilesModel.uploadFile(req.file).catch((error) => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
antd.message.error(error)
|
antd.message.error(error)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user