# Attaching the file to job diary - Filename changed

**URL:** <https://community.servicem8.com/t/attaching-the-file-to-job-diary-filename-changed/174>\
**Category:** API & SDK\
**Created:** [July 9, 2025, 1:32am UTC](https://community.servicem8.com/t/attaching-the-file-to-job-diary-filename-changed/174 "2025-07-09T01:32:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![developer](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@developer](https://community.servicem8.com/u/developer)\
**Post date:** [July 9, 2025, 1:32am UTC](https://community.servicem8.com/t/attaching-the-file-to-job-diary-filename-changed/174/1 "2025-07-09T01:32:34Z")

</div>

**Originally posted by Gene**

[https://developer.servicem8.com/docs/attaching-files-to-a-job-diary](https://developer.servicem8.com/docs/attaching-files-to-a-job-diary)

The pdf file I uploaded suddenly changed its filename after following the documentation. If I manually updated the filename it shows properly? Is there any issue on the filename on api?

```auto
const blob = new Blob([file.data], { type: "application/octet-stream" });
  formData.append("file", blob, decodedFilename);

  const uploadResponse = await fetch(
    `https://api.servicem8.com/api_1.0/Attachment/${attachmentUuid}.file`,
    {
      method: "POST",
      headers: {
        authorization: `Bearer ${token}`,
        Accept: "application/json",
      },
      body: formData,
    }
  );

```
