How can I use a request variable used in an upload form like this?
<form method="post" accept-charset="UTF-8" enctype="multipart/form-data">
<input type="hidden" name="action" value="entries/saveEntry">
<input type="hidden" name="sectionId" value="29">
<input type="hidden" name="enabled" value="1">
<input type="file" name="fields[useruploads]">
<input type="text" name="challenge_id">
...
The idea is to use the field "challenge_id" as dynamic upload location.
Is there a way to get this?
challenges/{{ craft.request.getPost('challenge_id') }}/
? I'd also be wary of accepting untrusted front-end input like this that ends up on the file system.