I'm writing application (Java + Spring Boot with security on backend), Angularjs on front. I need to send file to backend with share token (security purpose). I have got csrf enabled on backend and interceptor in angular to use it when I create http request. But it doesn't work with ng-dropzone.
I added dropzone config:
$scope.logoDropzoneConfig = {
parallelUploads: 1,
maxFileSize: 30,
url: '/api/companies/upload/logo',
};
But I have got type=org.springframework.security.access.AccessDeniedException, message=Access is denied.
It is possible to write custom method to send files instead of url in config?
http.csrf().ignoringAntMatchers("/api/companies/upload/logo")