import { File } from '../entities/file'
import { CreateFile } from 'wasp/server/operations'
type FileDescription = { fileType: string, name: string, bucket: string }
type Output = { file: File, key: string }
export const createFile: CreateFile<FileDescription, Output> = async ({ fileType, name, bucket}, context) => {
// ... your action logic here ...
return { file: myFile, key: myString }
}
import { File } from '../entities/file'
import { CreateFile } from 'wasp/server/operations'
type FileDescription = { fileType: string, name: string, bucket: string }
type Output = { file: File, key: string }
export const createFile: CreateFile<FileDescription, Output> = async ({ fileType, name, bucket}, context) => {
// ... your action logic here ...
return { file: myFile, key: myString }
}