Skip to content

Commit

Permalink
ON-39881 # Changed email attachment filename to all lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
jdawg093 committed Apr 26, 2024
1 parent b27d9ba commit 1621330
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/OneBlinkUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ export default class OneBlinkUploader {
abortSignal,
data,
contentType,
fileName,
filename,
}: UploadOptions & UploadEmailAttachmentOptions) {
return await uploadToS3({
...this,
Expand All @@ -441,7 +441,7 @@ export default class OneBlinkUploader {
abortSignal,
onProgress,
requestBodyHeader: {
fileName,
filename,
},
isPublic: false,
})
Expand Down
10 changes: 8 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ export type UploadFormSubmissionOptions = UploadOptions & {
jobId?: string
}

export type UploadAssetOptions = UploadOptions & {
export type UploadAssetBase = {
/** The file data to upload */
data: AttachmentUploadData
/** A standard MIME type describing the format of the contents */
contentType: string
}

export type UploadAssetOptions = UploadAssetBase & {
/** The name of the file being uploaded */
fileName: string
}
Expand All @@ -65,4 +68,7 @@ export type UploadPDFConversionOptions = UploadOptions & {
formId: number
}

export type UploadEmailAttachmentOptions = UploadAssetOptions
export type UploadEmailAttachmentOptions = UploadAssetBase & {
/** The name of the file being uploaded */
filename: string
}

0 comments on commit 1621330

Please sign in to comment.