I'm trying to upload an image in my Laravel application. Everything works fine in localhost. I've tested many times.
So, I've uploaded all files to the server and tested it again. Now when I upload an image, I'm getting the following error:
{"error":{"type":"Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException","message":"","file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php","line":210}}`
Not sure what's wrong in this. Everything is working fine in locahost. I'm using Ubuntu 14.02 in my server. GD library is installed and activated. Composer update has run and all packages are installed.
What might be the problem? Let me know if you need any code snippets. Thanks in advance.
php artisan routes(orphp artisan route:listfor Laravel 5) and see if the route you're uploading to exists and is correct./at the trailing part of the URL. Would that make any problem?/at the end it removed the301 permanently movederror. Now it shows the following errors:{"error":{"type":"ErrorException","message":"copy(\/var\/www\/html\/public\/\/upload\/20150413032940.jpeg): failed to open stream: Permission denied","file":"\/var\/www\/html\/app\/controllers\/NominationController.php","line":88}}chown user:group /path/to/directoryto change the ownership of the directory. or usechmod 775 /path/to/directoryto make it writeable for all users in the owners group.