Closed kspurgin closed 1 year ago
collectionspace-csv-importer uses mediafileuri
from original data row, not the response from this application.
Same for collectionspace-migration-tools.
That means it doesn't make sense to fix this in collectionspace-mapper
.
Also, it needs to be fixed in two different ways for the two tools. collectionspace-csv-importer makes API call through collectionspace-client, which handles final url encoding, so only the initial replacement of spaces with %20
needs to be handled. Sending through a fully escaped URL, which then gets re-escaped by collectionspace-client, will cause ingest error. collectionspace-migration-tools and the AWS Lambda function do not use the collectionspace-client, so the full url escaping needs to be handled.
%20
to make the mediafileuri validSpaces should ultimately become
%2520
because, as Ray explained: "Yes, because you’re putting a string containing % into the parameter of another URL. So the % needs to be escaped."