]> git.plutz.net Git - shellwiki/blobdiff - attachment.sh
handling of binary file uploads
[shellwiki] / attachment.sh
index b5e8491298ed398a3e7e733d37ef109c74b10405..d004b0db549954f00575810169f6a6665c9357e3 100755 (executable)
@@ -61,7 +61,14 @@ attachment_convert(){
 }
 
 if [ "${PATH_INFO%/\[attachment\]/}"  != "${PATH_INFO}" ]; then
-  theme_attachments "${PATH_INFO%\[attachment\]/}"
+  . "$_EXEC/multipart.sh"
+  if multipart_cache; then
+    debug 'Multipart "file":'
+    multipart file |hd |debug >/dev/null
+    REDIRECT "${_BASE}${PATH_INFO}"
+  else
+    theme_attachments "${PATH_INFO%\[attachment\]/}"
+  fi
 
 elif [ "${PATH_INFO%/\[attachment\]/*}" != "${PATH_INFO}" ]; then
   attpath="${PATH_INFO%/\[attachment\]/*}/#attachments/${PATH_INFO##*/}"