This fixes an issue where a file in a hashtag would cause the uploaded
file to be truncated after the hashtag, causing the share function to
fail subsequentially because the file was not found. Only the PUT
request to upload the file requires the hashtag to be encoded, as it's
part of the URL, while the POST request for the share has the path in
the POST parameters.
closes#1148.