File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
alttext_ai/actions/generate-alt-text Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export default {
7272
7373 let rawData = imageData ;
7474 if ( ! rawData ) {
75- const stream = await getFileStream ( this . imageInput ) ;
75+ const stream = await getFileStream ( imageFilePath ) ;
7676 const chunks = [ ] ;
7777 for await ( const chunk of stream ) {
7878 chunks . push ( chunk ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ export async function getFileUploadBody({
2727 const data = new FormData ( ) ;
2828 data . append ( "attributes" , JSON . stringify ( attributes ) ) ;
2929 data . append ( "file" , fileContent , {
30+ contentType : fileMeta . contentType ,
3031 knownLength : fileMeta . size ,
32+ filename : attributes . name ,
3133 } ) ;
3234
3335 return data ;
Original file line number Diff line number Diff line change 1- import path from "path" ;
21import constants from "./constants.mjs" ;
32import { getFileStreamAndMetadata } from "@pipedream/platform" ;
43
@@ -15,12 +14,13 @@ export default {
1514 . split ( "." ) [ 0 ] + "Z" ,
1615 content_modified_at : new Date ( metadata . lastModified ) . toISOString ( )
1716 . split ( "." ) [ 0 ] + "Z" ,
18- name : path . basename ( filePath ) ,
17+ name : metadata . name ,
1918 parent : {
2019 id : 0 ,
2120 } ,
2221 } ,
2322 size : metadata . size ,
23+ contentType : metadata . contentType ,
2424 } ,
2525 } ;
2626 } ,
You can’t perform that action at this time.
0 commit comments