[PR #562] [MERGED] feat: |Worker| add REMOVE_ALL_ATTACHMENT and REMOVE_EXCEED_SIZE_ATTAC… #625

Closed
opened 2026-02-26 21:32:06 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562
Author: @dreamhunter2333
Created: 1/18/2025
Status: Merged
Merged: 1/18/2025
Merged by: @dreamhunter2333

Base: mainHead: feature/dev


📝 Commits (1)

  • 24829b6 feat: |Worker| add REMOVE_ALL_ATTACHMENT and REMOVE_EXCEED_SIZE_ATTACHMENT

📊 Changes

8 files changed (+77 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 vitepress-docs/docs/en/cli.md (+4 -0)
📝 vitepress-docs/docs/zh/guide/cli/worker.md (+4 -0)
📝 worker/src/admin_api/worker_config.ts (+3 -0)
worker/src/email/check_attachment.ts (+48 -0)
📝 worker/src/email/index.ts (+9 -1)
📝 worker/src/types.d.ts (+2 -0)
📝 worker/wrangler.toml.template (+4 -0)

📄 Description

#447

User description

…HMENT


PR Type

enhancement, documentation


Description

  • Add configuration options to remove email attachments.

  • Implement logic to remove attachments based on size or configuration.

  • Update documentation to reflect new configuration options.

  • Update changelog with new features.


Changes walkthrough 📝

Relevant files
Enhancement
worker_config.ts
Add attachment removal configuration options                         

worker/src/admin_api/worker_config.ts

  • Add REMOVE_EXCEED_SIZE_ATTACHMENT and REMOVE_ALL_ATTACHMENT
    configuration options.
  • +3/-0     
    check_attachment.ts
    Implement attachment removal logic                                             

    worker/src/email/check_attachment.ts

  • Implement logic to remove attachments based on size or configuration.
  • Create MIME message without attachments if conditions are met.
  • +48/-0   
    index.ts
    Integrate attachment removal into email processing             

    worker/src/email/index.ts

  • Integrate attachment removal logic into email processing.
  • Handle errors during attachment removal.
  • +9/-1     
    types.d.ts
    Add types for new configuration options                                   

    worker/src/types.d.ts

  • Add types for REMOVE_ALL_ATTACHMENT and REMOVE_EXCEED_SIZE_ATTACHMENT.
  • +2/-0     
    Documentation
    CHANGELOG.md
    Update changelog with new features                                             

    CHANGELOG.md

    • Update changelog with new features for attachment removal.
    +3/-0     
    cli.md
    Document new attachment removal options                                   

    vitepress-docs/docs/en/cli.md

    • Document new configuration options for attachment removal.
    +4/-0     
    worker.md
    Document new attachment removal options in Chinese             

    vitepress-docs/docs/zh/guide/cli/worker.md

  • Document new configuration options for attachment removal in Chinese.
  • +4/-0     
    wrangler.toml.template
    Add attachment removal options to template                             

    worker/wrangler.toml.template

    • Add new configuration options for attachment removal to template.
    +4/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

    ## 📋 Pull Request Information **Original PR:** https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562 **Author:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Created:** 1/18/2025 **Status:** ✅ Merged **Merged:** 1/18/2025 **Merged by:** [@dreamhunter2333](https://github.com/dreamhunter2333) **Base:** `main` ← **Head:** `feature/dev` --- ### 📝 Commits (1) - [`24829b6`](https://github.com/dreamhunter2333/cloudflare_temp_email/commit/24829b67f5a170bf31e4628d7cbd3bed95a6a969) feat: |Worker| add REMOVE_ALL_ATTACHMENT and REMOVE_EXCEED_SIZE_ATTACHMENT ### 📊 Changes **8 files changed** (+77 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `vitepress-docs/docs/en/cli.md` (+4 -0) 📝 `vitepress-docs/docs/zh/guide/cli/worker.md` (+4 -0) 📝 `worker/src/admin_api/worker_config.ts` (+3 -0) ➕ `worker/src/email/check_attachment.ts` (+48 -0) 📝 `worker/src/email/index.ts` (+9 -1) 📝 `worker/src/types.d.ts` (+2 -0) 📝 `worker/wrangler.toml.template` (+4 -0) </details> ### 📄 Description #447 ### **User description** …HMENT ___ ### **PR Type** enhancement, documentation ___ ### **Description** - Add configuration options to remove email attachments. - Implement logic to remove attachments based on size or configuration. - Update documentation to reflect new configuration options. - Update changelog with new features. ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>worker_config.ts</strong><dd><code>Add attachment removal configuration options</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/admin_api/worker_config.ts <li>Add <code>REMOVE_EXCEED_SIZE_ATTACHMENT</code> and <code>REMOVE_ALL_ATTACHMENT</code> <br>configuration options. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-49df0a54d190cb8ea3788432fae88000683da8e61a5c4d0d184c8b7f0015a0ae">+3/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>check_attachment.ts</strong><dd><code>Implement attachment removal logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/check_attachment.ts <li>Implement logic to remove attachments based on size or configuration.<br> <li> Create MIME message without attachments if conditions are met. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-b9bd917cb9ec1a8c6fa329cd517b3c4b2c98d5c4b6f477f1d5e928d1972cfdcc">+48/-0</a>&nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>index.ts</strong><dd><code>Integrate attachment removal into email processing</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/email/index.ts <li>Integrate attachment removal logic into email processing.<br> <li> Handle errors during attachment removal. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-da1768152a73f37b0a0780d578569f84c3d4bb946294e3a81fb0271302e6d816">+9/-1</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>types.d.ts</strong><dd><code>Add types for new configuration options</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/src/types.d.ts <li>Add types for <code>REMOVE_ALL_ATTACHMENT</code> and <code>REMOVE_EXCEED_SIZE_ATTACHMENT</code>. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-583fb024d5c9d1efac71bbea788d8379e5e8fc2f0bb1696a9863c6f6cac54bee">+2/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr><tr><td><strong>Documentation</strong></td><td><table> <tr> <td> <details> <summary><strong>CHANGELOG.md</strong><dd><code>Update changelog with new features</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> CHANGELOG.md - Update changelog with new features for attachment removal. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed">+3/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>cli.md</strong><dd><code>Document new attachment removal options</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/en/cli.md - Document new configuration options for attachment removal. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-3f8f72a691fa19c8581621e91cf67ad28855af7a57e58513f6563cf4c8886e5f">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>worker.md</strong><dd><code>Document new attachment removal options in Chinese</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> vitepress-docs/docs/zh/guide/cli/worker.md <li>Document new configuration options for attachment removal in Chinese. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-f760a2ec5dad4b6bda0bd4a9325274567778add8cb984e73650dbaaf680c9178">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> <tr> <td> <details> <summary><strong>wrangler.toml.template</strong><dd><code>Add attachment removal options to template</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary> <hr> worker/wrangler.toml.template - Add new configuration options for attachment removal to template. </details> </td> <td><a href="https://github.com/dreamhunter2333/cloudflare_temp_email/pull/562/files#diff-743273da72481b71fbeb1dddfd294be9249554eef65691dfc9bcfa9f0fd971fb">+4/-0</a>&nbsp; &nbsp; &nbsp; </td> </tr> </table></td></tr></tr></tbody></table> ___ > 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull request to receive relevant information --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
    kerem 2026-02-26 21:32:06 +03:00
    Sign in to join this conversation.
    No milestone
    No project
    No assignees
    1 participant
    Notifications
    Due date
    The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

    No due date set.

    Dependencies

    No dependencies set.

    Reference
    starred/cloudflare_temp_email#625
    No description provided.