About the angular-filemanager (https://github.com/joni2back/angular-filemanager), java bridge implemented in a servlet... is the GET missing its handling of the action string? It would seem that the initial listing of the root directory will ceom from a GET request. But the only call to actuall list thej files and folders in the root folder comes from the servlet POST.
Thanks!
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//action is "list" is only handled in the POST of the servlet....
String action = request.getParameter("action");
if ("download".equals(action)) {
...
} else if ("downloadMultiple".equals(action)) {
}
...and here is my init routine from index.html (that "php" URL is mapped to my Java Servlet in web.xml, if angular-filemanager supports changing that main URL, please let me know):
<script type="text/javascript">
//example to override angular-filemanager default config
angular.module('FileManagerApp').config(['fileManagerConfigProvider', function (config) {
var defaults = config.$get();
config.set({
appName: 'ews-filemanager',
listUrl: '/ews-filemanager/bridges/php/handler.php',
pickCallback: function(item) {
var msg = 'Picked %s "%s" for external use'
.replace('%s', item.type)
.replace('%s', item.fullPath());
window.alert(msg);
},
allowedActions: angular.extend(defaults.allowedActions, {
pickFiles: false,
pickFolders: false,
}),
});
}]);
Working now. So JS lib does make posts, just that the java bridge had errors. E.g. if you are on windows, you want to change all the Posix FS permissions java classes to their DOS equivenlents. Or in my case, I am doing all authorization outside of the file system, so just update set and get Permissions, to simplz return "rw-rw-rw-". In short, get the Bridge (a.k.a. back end) installed as is, mazbe with spring security (in the case of java) turned off (do that be commenting out the same in web.xml) and get the basic index.html example working, then integrate in your app. I am doing it with an iframe and deploying angular-filemanager in its own war on the same web server....