aboutsummaryrefslogtreecommitdiff
path: root/utils/handle-post-upload.sh
diff options
context:
space:
mode:
Diffstat (limited to 'utils/handle-post-upload.sh')
-rwxr-xr-xutils/handle-post-upload.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/utils/handle-post-upload.sh b/utils/handle-post-upload.sh
index 1aff46c..43f6b19 100755
--- a/utils/handle-post-upload.sh
+++ b/utils/handle-post-upload.sh
@@ -18,8 +18,8 @@ if [ -d "$CGIBASHOPTS_DIR" ]; then
mkdir -p "$FILE_POST_DESTINATION"
for file in "$CGIBASHOPTS_DIR/"*; do
- cp "$file" "$FILE_POST_DESTINATION"
- POST_FILES="${POST_FILES}$FILE_POST_PATH/$(basename "$file");"
+ cp "$file" "$FILE_POST_DESTINATION/$FORM_attachment"
+ POST_FILES="${POST_FILES}$FILE_POST_PATH/$FORM_attachment;"
done
fi
@@ -28,7 +28,15 @@ $FORM_is_private
$FORM_name
$FORM_email
$POST_FILES
-$FORM_message
+$(sanitize-html-entities "$FORM_message")
NEW_POST
-BODY="OK"
+BODY="$(cat <<RESPONSE
+<main>
+ <article>
+ <h1>Post enviado!</h1>
+ <a href="$FORM_redirect_to">Voltar para a página anterior.</a>
+ </article>
+</main>
+RESPONSE
+)"