mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-17 07:04:36 +00:00
fix api manager
This commit is contained in:
1 parent
77e3bd0b66
commit
7df7e7b913
2 files changed
+5
-7
No files matched your search
@@ -10,13 +10,11 @@ class MediaUploadManager {
|
||||
//this.baseUrl = "http://localhost:12345"
|
||||
}
|
||||
|
||||
|
||||
async saveScene(scene:Scene) {
|
||||
|
||||
async saveScene(scene:Scene):Promise<string> {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
async uploadMedia(blob:any, fileName:string):Promise {
|
||||
async uploadMedia(blob:any, fileName:string):Promise<string> {
|
||||
const url = `${this.baseUrl}/v1/media_uploads/upload`;
|
||||
let uuid = uuidv4();
|
||||
const formData = new FormData();
|
||||
@@ -41,7 +39,7 @@ class MediaUploadManager {
|
||||
return response.json(); // or handle the response as appropriate
|
||||
}
|
||||
|
||||
async uploadGLB(file:File) {
|
||||
async uploadGLB(file:File):Promise<string> {
|
||||
const url = `${this.baseUrl}/v1/media_files/upload/engine_asset`;
|
||||
let uuid = uuidv4();
|
||||
const formData = new FormData();
|
||||
|
||||
@@ -5,7 +5,7 @@ import { TransformControls } from 'three/addons/controls/TransformControls.js';
|
||||
import Stats from 'three/addons/libs/stats.module.js';
|
||||
import Scene from './scene.js';
|
||||
import SaveManager from './serialization.js';
|
||||
import MediaUploadManager from './api_manager.js';
|
||||
import MediaUploadManager from './api_manager.ts';
|
||||
import AudioManager from './audio_manager.js';
|
||||
|
||||
import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js';
|
||||
|
||||
Reference in new issue
Block a user