Skip to content

Do path and file validation to avoid 500 errors #26

@qqmyers

Description

@qqmyers

Operating systems allow characters in paths and filenames that Dataverse does not. In gdcc/dvwebloader#27, checks have been added to see if there are invalid chars in either filename or path and to give the user the option to not upload or allow substitution of an underscore for any disallowed chars. That PR also handles path/name munging when checking for files that already exist in the dataset. DVUploader should probably do the same and, after a quick code check, I don't think it does.

The symptom seen with dvwebloader in both cases (filename or directoryLabel) was a 500 error from Dataverse.

Note that with direct uploads, this failure leaves orphaned files in the bucket - cleaning temp files using the temp tag or calling the clean orphan files api in Dataverse will remove them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions