API "loses" Polish language characters?

I use make.com to automate creation of tasks based on our internal ticket system.
Everything works fine apart from 1 thing:

attachments added via ASANA API don’t contain Polish characters (like “ł”, “ę” etc.). The characters are sent properly to ASANA (in binary form) - but it seems that ASANA somehow loses the format (?).

Exapmle picture:

i paste the RAW log below:
{
“response”: {
“status”: 200,
“headers”: {
“content-type”: “application/json; charset=UTF-8”,
“content-length”: “134”,
“connection”: “close”,
“date”: “Tue, 28 May 2024 09:49:41 GMT”,
“server”: “nginx”,
“cache-control”: “no-store”,
“pragma”: “no-cache”,
“x-frame-options”: “DENY”,
“x-xss-protection”: “1; mode=block”,
“x-content-type-options”: “nosniff”,
“content-security-policy”: “report-uri https://app.asana.com/-/csp_report?report_only=false;default-src ‘none’;frame-src ‘none’;frame-ancestors ‘none’”,
“x-asana-api-version”: “1.0”,
“asana-change”: “name=new_user_task_lists;info=Update on our planned API changes to user task lists (a.k.a. My Tasks), name=new_goal_memberships;info=https://forum.asana.com/t/launched-team-sharing-for-goals/378601;affected=true”,
“x-robots-tag”: “none”,
“strict-transport-security”: “max-age=31536000; includeSubDomains; preload”,
“datacenter-time-end”: “1716889781.252”,
“x-loadbalancer”: “prod-lb002.ec2”,
“x-cache”: “Miss from cloudfront”,
“via”: “1.1 53b9c84dd8372210fe40e0f18936cbc0.cloudfront.net (CloudFront)”,
“x-amz-cf-pop”: “DUB56-P1”,
“x-amz-cf-id”: “TywUqjuR7wQytNTGnG9LMXnNs-9utq2MxYEx9x0v9w_4R2VMrvyjgQ==”,
“referrer-policy”: “strict-origin-when-cross-origin”,
“x-ua-compatible”: “IE=edge,chrome=1”
},
“body”: {
“data”: {
“gid”: “1207421434151452”,
“resource_type”: “attachment”,
“name”: “przykÅadxmlofertowy-schema.xsd”,
“resource_subtype”: “asana”
}
}
},
“request”: {
“url”: “https://app.asana.com/api/1.0/tasks/1207411444559943/attachments”,
“headers”: {
“user-agent”: “Make/production”,
“content-type”: “multipart/form-data”,
“authorization”: “***”
},
“method”: “POST”,
“body”: {
“file”: {
“value”: “IMTBuffer(6270, utf-8, 56e9e455aefd9b1162c4997c7245148c93b5cc7a)”,
“options”: {
“filename”: “przykładxmlofertowy-schema.xsd”
}
}
}
}
}

Can you tell me why is that nand how can i get it to set the files’ names properly?

Hi @kmirek,

I’m looking into this. In my tests so far, I’m seeing the same behavior you are when I upload an attachment using cURL or Node.js where the characters in the filename are not being encoded correctly. However, if I upload an attachment using Postman, the filename is encoded correctly. I don’t know what Postman is doing differently, but it makes me believe there must be a way to encode the filename or supply additional encoding information in the API call to make this work. I will let you know if I learn a fix.

1 Like

@David_Neal Hi! Any news on that? Have same problem with Cyrylic filenames:

FILENAME="файл.pdf"

curl -X POST \
  'https://app.asana.com/api/1.0/attachments' \
  -H 'Authorization: Bearer 2/1208902800650815/1208902953215480:36a17a602757a3a1ef3f669db61ea7e7' \
  -H 'Content-Type: multipart/form-data' \
  --form-string "name=YOUR_DESIRED_FILENAME.pdf" \
  -F "file=@\"$FILENAME\";type=application/pdf" \
  --form "parent=1208902923833135"

Results in: