Closed rgozdzialski closed 8 years ago
I just tested it, it works.
Make sure /convert-save
is a POST route and you have CSRF disabled for that route, see the Laravel docs: https://laravel.com/docs/master/routing#csrf-excluding-uris
I did both of the things and retested - no luck. What confuses me a bit is that you suggest to change the callback route to POST, while the API docs specifies they will do a GET to the callback URL.
Anyway, it works for you, so it has to be something environment specific. I would say, if you don't have more ideas, let's close the issue.
Btw, I'm using Laravel 5.2.34
You're right it is a GET route, I was looking at the hooks section of the API. The callback still works for me though.
Here's my code:
Route::get('/callback', function(){
CloudConvert::useProcess($_REQUEST['url'])
->save(public_path('robots.pdf'));
});
I'm following the implementation provided here. To test it, I call
/convert
URL on my server. The robots.txt file is being converted correctly, but is not stored back on the server as PDF using the callback function.The code:
then
Both /convert and /convert-save are public, reachable URLs.
Anything wrong with my implementation? Anything I'm missing?