Skip to content

Commit

Permalink
Automated build docs: 2024-12-11 22:54:22
Browse files Browse the repository at this point in the history
  • Loading branch information
asana-push-openapi-spec[bot] committed Dec 11, 2024
1 parent 6321c6f commit ca96dcc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions defs/asana_oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9207,6 +9207,23 @@ paths:
Requests made should follow the HTTP/1.1 specification that line
terminators are of the form `CRLF` or `\r\n` outlined
[here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.

For file names that contain non-ASCII characters, the file name should be URL-encoded. For example, a file named `résumé.pdf` should be encoded as
`r%C3%A9sum%C3%A9.pdf` and the `filename` parameter in the `Content-Disposition` header should be set to the encoded file name.

Below is an example of a cURL request with the `Content-Disposition` header:

```
export ASANA_PAT="<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>"
export PARENT_ID="<PARENT_GID>"
export ENCODED_NAME="r%C3%A9sum%C3%A9.pdf"
curl --location 'https://app.asana.com/api/1.0/attachments' \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $ASANA_PAT" \
--form "parent=$PARENT_ID" \
--form "file=@/Users/exampleUser/Downloads/résumé.pdf;headers=\"Content-Disposition: form-data; name="file"; filename="$ENCODED_NAME.pdf"; filename*=UTF-8''$ENCODED_NAME.pdf\""
```
tags:
- Attachments
operationId: createAttachmentForObject
Expand Down
17 changes: 17 additions & 0 deletions defs/asana_sdk_oas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32086,6 +32086,23 @@ paths:
Requests made should follow the HTTP/1.1 specification that line
terminators are of the form `CRLF` or `\r\n` outlined
[here](http://www.w3.org/Protocols/HTTP/1.1/draft-ietf-http-v11-spec-01#Basic-Rules) in order for the server to reliably and properly handle the request.

For file names that contain non-ASCII characters, the file name should be URL-encoded. For example, a file named `résumé.pdf` should be encoded as
`r%C3%A9sum%C3%A9.pdf` and the `filename` parameter in the `Content-Disposition` header should be set to the encoded file name.

Below is an example of a cURL request with the `Content-Disposition` header:

```
export ASANA_PAT="<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>"
export PARENT_ID="<PARENT_GID>"
export ENCODED_NAME="r%C3%A9sum%C3%A9.pdf"
curl --location 'https://app.asana.com/api/1.0/attachments' \
--header 'Content-Type: multipart/form-data' \
--header 'Accept: application/json' \
--header "Authorization: Bearer $ASANA_PAT" \
--form "parent=$PARENT_ID" \
--form "file=@/Users/exampleUser/Downloads/résumé.pdf;headers=\"Content-Disposition: form-data; name="file"; filename="$ENCODED_NAME.pdf"; filename*=UTF-8''$ENCODED_NAME.pdf\""
```
tags:
- Attachments
operationId: createAttachmentForObject
Expand Down

0 comments on commit ca96dcc

Please sign in to comment.