datadryad / dryad-product-roadmap

Repository of issues for Dryad project boards
https://github.com/orgs/datadryad/projects
8 stars 0 forks source link

Extra text in files uploaded by API #3783

Open ryscher opened 1 day ago

ryscher commented 1 day ago

From ACS:

While testing in the Sandbox recently, we noticed that files uploaded via https://sandbox.datadryad.org/api/v2/datasets/{doi}/files/{filename} had unnecessary metadata included in the file content. This is causing poor formatting in text based files upon download and is causing other file types (XLSX and multiple different image types for example) to be corrupted entirely upon download. We verified that this is happening outside of our system by making a call directly to the Dryad API with Postman. The cURL for that request is below, and the “Before” and “After” for the related README file are attached.

cURL:
curl --location 'https://sandbox.datadryad.org/api/v2/datasets/doi%3A10.7959%2Fdryad.2280gb5n9/files/readme.md' \
--header 'Authorization: Bearer <token>' \
--header 'Cookie: AWSALB=TwgflfJfFOI6nRpS2E5CWOtQpr+xS6cPnv3Udf54MNdy8gwYVPZV7wCADLgLCuZKT85l19P1jMXTQOfn7YA4maVtj8Y/j9jvVcNHDiD2qqQF0BRpBmAtjWD7TUuG; AWSALBCORS=TwgflfJfFOI6nRpS2E5CWOtQpr+xS6cPnv3Udf54MNdy8gwYVPZV7wCADLgLCuZKT85l19P1jMXTQOfn7YA4maVtj8Y/j9jvVcNHDiD2qqQF0BRpBmAtjWD7TUuG; AWSALBTG=nMVKoUIiO0a++6WGt8+O9Nnt5OpQKYVpJFM6aEyLSDdBVIPrUbjxKXfYN9M8MO7HtD6+9221IbCgexVpBQA7X7MCLzDSNPmthORuIKrRjuWNQ212/kzEho/B9SymWlFwISP5Fmg6rJA6KY3yHN9XgBZno+4eVP86mz1hLMCH/muSUo8TQTg=; AWSALBTGCORS=nMVKoUIiO0a++6WGt8+O9Nnt5OpQKYVpJFM6aEyLSDdBVIPrUbjxKXfYN9M8MO7HtD6+9221IbCgexVpBQA7X7MCLzDSNPmthORuIKrRjuWNQ212/kzEho/B9SymWlFwISP5Fmg6rJA6KY3yHN9XgBZno+4eVP86mz1hLMCH/muSUo8TQTg=; AWSALB=4bbHOr9eAIJbd0gHanqNwm5JhzuP124uqubKJSzsnP7k/3vxOWaTC/oWWbr8A/qNyYx/wKJ35lA0VUeroqwTAxVDpmhI7wWvnyyco57DtljNf5snBE2fSIerbmMV; AWSALBCORS=4bbHOr9eAIJbd0gHanqNwm5JhzuP124uqubKJSzsnP7k/3vxOWaTC/oWWbr8A/qNyYx/wKJ35lA0VUeroqwTAxVDpmhI7wWvnyyco57DtljNf5snBE2fSIerbmMV; AWSALBTG=EP6cVN2dGntYsVNxUHcvpyh6CheYJZQ4pI3C6F2iAC5UWI5BLqBOnD0B7dRa0dgTjiEv4ZMp4xF4ZmR9QQkdNPm6zSqauhnQFgUYtB+zwYtnWHbRNasnhO7uv7zPktSHT2+aauiLmbvuvp9C1/19YPJLQkTkIa0IA4cZZKjncSB3gg6Ktlc=; AWSALBTGCORS=EP6cVN2dGntYsVNxUHcvpyh6CheYJZQ4pI3C6F2iAC5UWI5BLqBOnD0B7dRa0dgTjiEv4ZMp4xF4ZmR9QQkdNPm6zSqauhnQFgUYtB+zwYtnWHbRNasnhO7uv7zPktSHT2+aauiLmbvuvp9C1/19YPJLQkTkIa0IA4cZZKjncSB3gg6Ktlc=' \
--form '=@"/C:/Users/00480/Downloads/README.md"'
ryscher commented 1 day ago

README - Sent to Dryad (Before).md README - Stored on Dryad (After).md