Files
artcraft/app/api/media_files/UploadEngineAsset.ts
T
ArEnScandVictor 4303afcb9b added object preview to upload modal (#231)
cover images added to uploaded objects
removed some logs, added some types

---------

Co-authored-by: Victor <victor@storyteller.ai>
2024-04-25 14:02:41 -04:00

44 lines
1.2 KiB
TypeScript

import { MediaFileSubtype } from "../enums/MediaFileSubtype";
import MakeMultipartRequest from "../MakeMultipartRequest";
export enum MediaFileSubtype {
/// Animation file from Mixamo
/// Primarily used for FBX and GLB.
Mixamo = "mixamo",
/// Animation file from MocapNet
/// Primarily used for BVH.
MocapNet = "mocap_net",
/// Generic animation case
/// Used for BVH files, but can also pertain to animation-only files of other types.
AnimationOnly = "animation_only",
// TODO(bt,2024-03-08): Migrate records and code, then remove
/// DEPRECATED: Use `SceneImport` instead.
Scene = "scene",
/// Generic 3D scene file.
/// Can pertain to glTF, glB, FBX, etc.
SceneImport = "scene_import",
/// Native Storyteller scene format.
/// Typically stored in a `.scn.ron` file.
StorytellerScene = "storyteller_scene",
}
export interface UploadEngineAssetRequest {
uuid_idempotency_token?: string,
file: any,
media_file_subtype?: MediaFileSubtype;
}
export interface UploadEngineAssetResponse {
media_file_token: string,
success: boolean
}
export const UploadEngineAsset = (request: UploadEngineAssetRequest) => {
return MakeMultipartRequest("/v1/media_files/upload/engine_asset", request);
}