FFastrans CORS api JSON
Posted: Tue Mar 02, 2021 6:25 am
Hello,
I have a Ffastrans at home, in a farming environment, it works fine for years. Recently upgrade from 0.9 to 1.2.0, no issue.
I have done a new workflow :
- get an youtube URL from .txt
- populate variable "youtubelink" from .txt file
- get video with a youtube-dl personal
- transcode
- rename
This work fine.
I am trying to start this workflow from a webpage (webserver is on my synology) whith API.
When I try with postman or reqbin, I have no issue.
I send a post as application/json :
- id wf
- id start node
- input file (fake because i dont use it after)
- variable youtubelink.
But when I try with ajax, it does not work, because of CORS.
it seems CORS allow only text/plain with cross origin..
With ajax i can get list of all workflows for example (because is a "simple" request ?)
How can I configure CORS in FFastrans to resolve this issue ?
Best regards,
PD : I am from video, the website and this things i'am trying to learn as a hobby
I have a Ffastrans at home, in a farming environment, it works fine for years. Recently upgrade from 0.9 to 1.2.0, no issue.
I have done a new workflow :
- get an youtube URL from .txt
- populate variable "youtubelink" from .txt file
- get video with a youtube-dl personal
- transcode
- rename
This work fine.
I am trying to start this workflow from a webpage (webserver is on my synology) whith API.
When I try with postman or reqbin, I have no issue.
I send a post as application/json :
- id wf
- id start node
- input file (fake because i dont use it after)
- variable youtubelink.
But when I try with ajax, it does not work, because of CORS.
it seems CORS allow only text/plain with cross origin..
With ajax i can get list of all workflows for example (because is a "simple" request ?)
How can I configure CORS in FFastrans to resolve this issue ?
Best regards,
PD : I am from video, the website and this things i'am trying to learn as a hobby