Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to upload a file in tFileFetch and keep getting error "
File is not a normal file
." when I append ;type=text/csv to the file name on advanced settings.The API endpoint requires this format: --form 'input_data=@"REPLACE_WITH_PATH_TO_FILE";type=text/csv'
I got it to work in Postman and in curl command, but not in tFileFetch.
Any idea how would I pass this to the URL?
-F input_data=@C:\Users\oneman\Postman\files\upload.csv;type=text/csv
Hello,
In advanced settings, upload file settings, could you please try to set Content-type as "application/octet-stream" to see if it works?
Or you could use the tRestClient component, with PUT method and add the content type to “text/csv” in the header( tRestClient>advanced settings).
Best regards
Sabrina
Hi @Sabrina,
Thanks for the response. I did try both ways and neither worked.
tFileFetch errored on "File is not a normal file" when I changed the content-type as "application/octet-stream". I then removed ";type=text/csv " from the end of the file path and it errored on "Method failed: HTTP/1.1 422 Unprocessable Content". That's because it requires that type at the end of the file path.
tRESTClient doesn't run with that header in advanced settings. It errors on "Syntax error on token "Invalid Character", delete this token".
Hello,
Please refer to belows only as a reference,
https://stackoverflow.com/questions/393647/response-content-type-as-csv
Hope it helps.
Best regards
Sabrina