mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
fixed AI import
This commit is contained in:
@@ -84,7 +84,11 @@ export function useFileApi() {
|
||||
function doAiImport(file: File|null, text: string = '') {
|
||||
let formData = new FormData()
|
||||
|
||||
formData.append('file', '')
|
||||
if(file != null){
|
||||
formData.append('file', file)
|
||||
} else {
|
||||
formData.append('file', '')
|
||||
}
|
||||
formData.append('text', text)
|
||||
|
||||
return fetch(getDjangoUrl(`api/ai-import/`), {
|
||||
|
||||
Reference in New Issue
Block a user