gdcc / dvwebloader

A web tool for uploading folders of files to a Dataverse dataset
Apache License 2.0
1 stars 8 forks source link

GDCC/21- Handle path and file validation #27

Closed qqmyers closed 1 month ago

qqmyers commented 3 months ago

This PR adds checks for valid path and filenames, using regexes based on the rules reported by Dataverse in the server.log. With the PR, these potential errors are caught and the user is warned that disallowed chars will be replaced by _ if the highlighted files are actually selected for upload. That substitution is done if any such files are uploaded. Checks for existing files also handle this substitution, i.e. the check is to see if a file with the changed path/filename exists in the dataset (not just the original/not allowed versions with bad chars).

Closes #21

In addition to #21, these issues were seen at QDR and we've been testing with our (slight) variant (some styling changes).

qqmyers commented 1 month ago

Closing in favor of #36