Changeset

11350:3287dbdde33e

mod_http_file_share: Reorder arguments 'filetype' is optional, so having it last seems sensible. 'slot' is pretty important, so moving it earlier seems sensible.
author Kim Alvefur <zash@zash.se>
date Sun, 31 Jan 2021 20:38:40 +0100
parents 11349:a219001b449d
children 11351:6b541d3c4c1b
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http_file_share.lua	Sun Jan 31 17:44:19 2021 +0100
+++ b/plugins/mod_http_file_share.lua	Sun Jan 31 20:38:40 2021 +0100
@@ -121,7 +121,7 @@
 	return true;
 end
 
-function get_authz(uploader, filename, filesize, filetype, slot)
+function get_authz(slot, uploader, filename, filesize, filetype)
 	return jwt.sign(secret, {
 		sub = uploader;
 		filename = filename;
@@ -175,7 +175,7 @@
 		quota_cache:set(uploader, cached_quota);
 	end
 
-	local authz = get_authz(uploader, filename, filesize, filetype, slot);
+	local authz = get_authz(slot, uploader, filename, filesize, filetype);
 	local slot_url = get_url(slot, filename);
 	local upload_url = slot_url;