# We forbid usage of a few characters, for the good of
# everybody...
os.unlink(uploaded_filepath)
body+='<script>alert("%s");</script>'% \
_("You are not allowed to use dot '.', slash '/', or backslash '\\\\' in file names. Choose a different name and upload your file again. In particular, note that you should not include the extension in the renaming field.").replace('"','\\"')
else:
# No conflict with file name
# When revising, delete previously uploaded files for
# We forbid usage of a few characters, for the good of
# everybody...
body+='<script>alert("%s");</script>'% \
_("You are not allowed to use dot '.', slash '/', or backslash '\\\\' in file names. Choose a different name and upload your file again. In particular, note that you should not include the extension in the renaming field.").replace('"','\\"')
# Display markup of the revision panel. This one is also
# printed only at the beginning, so that it does not need to
# be returned with each response
body+=revise_balloon% \
{'CFG_SITE_URL':CFG_SITE_URL,
'file_label':file_label,
'filename_label':filename_label,
'description_label':description_label,
'comment_label':comment_label,
'restrictions':restrictions_list,
'previous_versions_help':_('You can decide to hide or not previous version(s) of this file.').replace("'","\\'"),
'revise_format_help':_('When you revise a file, the additional formats that you might have previously uploaded are removed, since they no longer up-to-date with the new file.').replace("'","\\'"),
'revise_format_warning':_('Alternative formats uploaded for current version of this file will be removed'),