- 
	
I've created ad-hoc commands for managing uploaded files:
- For ADMIN:
1.1. Query used space by files of a user (node: 
query-space-used-admin) You need to enter user jid (intojidfield) to fetch this data. Value will be returned in the form inused-spacefield. 1.2. Query used space by files of users from a domain (node:query-space-used-domain) You need to enter domain (intodomainfield) and value will be returned inused-spaceform field. 1.3. Query files uploaded by user/users of a domain (node:query-files-admin) You need to select atypeof a query (files of a user or files from a domain users). Then you enterjidof a user ordomainto query. You need to submit a form to retrieve list of files (from the oldest) returned as a list of<item/>elements in the form (one for each returned slot). Headers for those results are in<reported/>element (as specified at https://xmpp.org/extensions/xep-0050.html#execute see example 9) most of the fields are easy to understand. Additionally, there isurlwhich has url for downloading file andid(id of a slot) which can be used as a value forafter-idform field to retrieve next results.limitfield returns number of items returned in each request. (Slots are returned from the oldest to the newest). 1.4. Remove file (node:delete-slot-admin) To remove a file, you need to fill a form withslot-id(id of a file slot to remove) andjid(jid of the owner/uploader of the file) and submit the form. - For USER:
2.1. Query used space by files of a user (node: 
query-space-used) After execution (no form to fill), the value will be returned in the form inused-spacefield. 2.2. Query files uploaded by user (node:query-files) Then you enterjidof a user and then you need to submit a form to retrieve list of files (from the oldest) returned as a list of<item/>elements in the form (one for each returned slot). Headers for those results are in<reported/>element (as specified at https://xmpp.org/extensions/xep-0050.html#execute see example 9) most of the fields are easy to understand. Additionally, there isurlwhich has url for downloading file andid(id of a slot) which can be used as a value forafter-idform field to retrieve next results.limitfield returns number of items returned in each request. (Slots are returned from the oldest to the newest). 2.3. Remove file (node:delete-slot) To remove a file, you need to fill a form withslot-id(id of a file slot to remove) and submit the form. 
NOTE: Each form can be submitted in a single step. If you know the form on the last step you can prepare a form on the client side and just send it in the initial request to the server to speed up processing (no need to wait for a server to return a form).
I'm assigning this to @wojtek to review changes related to project and bumped dependency versions.
@kobit Please review my comment and let me know if that is what you expected to have.
Basically, the admin can:
- Query space used by user or by domain
 - Browse uploaded files (slots) of any user
 - Remove file of any user
 
The user can:
- Query space used by his files
 - Browse his files
 - Remove his files
 
Note: We do use ACL for ad-hoc commands, so those commands need to be configured to be executed by
DOMAIN_ADMIN- for admin commands, andLOCALfor user commands. - For ADMIN:
1.1. Query used space by files of a user (node: 
 - 
	
@kobit Yes, you are correct. That is just for managing files uploaded by the user (or users of a domain). While for user most of the browsing might be done with UA (MAM+extensions), I've implemented this one as it can still be useful i.e. for domain owners or admins.
 - 
	
@andrzej.wojcik one (nitpick) question - wouldn't it be prudent to merge
query-space-used-adminandquery-space-used-domaininto a single command (akinquery-filescommand) and possibly give result based on input (JID with or without localpart) or re-utiliseQueryFilesCommandAdmin.QueryTypefrom query-file?Note: We do use ACL for ad-hoc commands, so those commands need to be configured to be executed by DOMAIN_ADMIN - for admin commands, and LOCAL for user commands.
Haven't we talked about extending the API with "default adhoc ACL"?
I went over the code and it looks ok.
 - 
	
one (nitpick) question - wouldn't it be prudent to merge
query-space-used-adminandquery-space-used-domaininto a single command (akinquery-filescommand) and possibly give result based on input (JID with or without localpart) or re-utiliseQueryFilesCommandAdmin.QueryTypefrom query-file?I thought that we may need/want to add some additional data to
query-space-used-domainor give access to this command to non-admins and ie. users or managers (not always with admins rights) - people without rights to query other user files or space of used by files uploaded by others.Note: We do use ACL for ad-hoc commands, so those commands need to be configured to be executed by DOMAIN_ADMIN - for admin commands, and LOCAL for user commands.
Haven't we talked about extending the API with "default adhoc ACL"?
Yes, we talked about it, but I did not follow up on this idea, so it is not implemented.
 - 
	
@andrzej.wojcik please squash and merge the changes.
 
| Type | 
	 Task 	
	 | 
					
| Priority | 
	 Normal 	
	 | 
					
| Assignee | |
| Version | 
	 tigase-server-8.2.0 	
	 | 
					
	
				
	
			
HTTP File Upload component implemented according to the XEP-0363: HTTP File Upload does not provide any way to manage uploaded files. It would be good to have a way to: