aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnirudh Oppiliappan <x@icyphox.sh>2021-08-16 10:11:39 +0530
committerAnirudh Oppiliappan <x@icyphox.sh>2021-08-16 10:11:39 +0530
commit96aeb8fa8fc95959f40f1a841e88b04e057ef211 (patch)
tree933485779cd94549db4ad5fbcde8ff1c8602cf2d
parentb00f8f23450ac8f362a2eaa234199b820fbd17a3 (diff)
downloadfsrv-96aeb8fa8fc95959f40f1a841e88b04e057ef211.tar.gz
Add notes on filetype hooks
-rw-r--r--readme12
1 files changed, 12 insertions, 0 deletions
diff --git a/readme b/readme
index c95c6d4..266ac7a 100644
--- a/readme
+++ b/readme
@@ -9,6 +9,7 @@ Filehost server for https://x.icyphox.sh.
9· Only handles file upload. Serving is left to the reverse proxy. 9· Only handles file upload. Serving is left to the reverse proxy.
10· Bring your own index.html (-index flag) 10· Bring your own index.html (-index flag)
11· Requires a key to upload. Change the default! 11· Requires a key to upload. Change the default!
12· Filetype hooks. (See HOOKS)
12 13
13 14
14USAGE 15USAGE
@@ -28,3 +29,14 @@ USAGE
28 url for fsrv to serve files (default "localhost") 29 url for fsrv to serve files (default "localhost")
29 30
30Sample index.html is provided. Edit as required. 31Sample index.html is provided. Edit as required.
32
33
34HOOKS
35
36Hooks can be defined in the 'hooks/' directory for specific filetypes.
37These can be written in any language, provided the file is executable,
38and accepts one argument: the file to execute against.
39
40For example: the hooks/7z.sh file will run against all 7z files, and will
41recieve the filename as an argument ($1). The filetype is determined by
42parsing magic bytes, and not by file extension.