[PR #4820] [MERGED] feat: support uploading local image #6467

Closed
opened 2026-03-23 22:23:21 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4820
Author: @qinluhe
Created: 3/5/2024
Status: Merged
Merged: 3/5/2024
Merged by: @qinluhe

Base: mainHead: feat/support-upload-local-image


📝 Commits (3)

  • 2fe7278 feat: support uploading local image
  • 706f99c fix: code review
  • 8d61c5c fix: add hover style to empty image block

📊 Changes

19 files changed (+397 additions, -81 deletions)

View changed files

📝 frontend/appflowy_tauri/src-tauri/Cargo.lock (+79 -0)
📝 frontend/appflowy_tauri/src-tauri/Cargo.toml (+1 -1)
📝 frontend/appflowy_tauri/src-tauri/tauri.conf.json (+9 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/application/document/document.types.ts (+1 -0)
frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/LocalImage.tsx (+60 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadImage.tsx (+91 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadTabs.tsx (+18 -13)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/index.ts (+1 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/view_title/cover/CoverPopover.tsx (+22 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/_shared/view_title/cover/ViewCover.tsx (+18 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageEmpty.tsx (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageRender.tsx (+59 -43)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageResizer.tsx (+2 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/UploadPopover.tsx (+13 -6)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/math_equation/MathEquation.tsx (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/editor/editor.scss (+5 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/utils/mui.ts (+4 -0)
frontend/appflowy_tauri/src/appflowy_app/utils/upload_image.ts (+9 -0)
📝 frontend/resources/translations/en.json (+3 -2)

📄 Description

Feature Preview

https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/59f416e8-d309-4138-8b94-05bc3c51ff15

  • Support uploading local images and backing them up
  • Uploading cloud images is not supported (Implement the login function first)

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 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/AppFlowy-IO/AppFlowy/pull/4820 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 3/5/2024 **Status:** ✅ Merged **Merged:** 3/5/2024 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `main` ← **Head:** `feat/support-upload-local-image` --- ### 📝 Commits (3) - [`2fe7278`](https://github.com/AppFlowy-IO/AppFlowy/commit/2fe72786de84db163b21a5a130d451b30c61fa55) feat: support uploading local image - [`706f99c`](https://github.com/AppFlowy-IO/AppFlowy/commit/706f99c8bdd45aad8210bb1709f5578f03aae39a) fix: code review - [`8d61c5c`](https://github.com/AppFlowy-IO/AppFlowy/commit/8d61c5c2a513a7fc184ea73bda5079ebe0cd64c6) fix: add hover style to empty image block ### 📊 Changes **19 files changed** (+397 additions, -81 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/src-tauri/Cargo.lock` (+79 -0) 📝 `frontend/appflowy_tauri/src-tauri/Cargo.toml` (+1 -1) 📝 `frontend/appflowy_tauri/src-tauri/tauri.conf.json` (+9 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/application/document/document.types.ts` (+1 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/LocalImage.tsx` (+60 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadImage.tsx` (+91 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/UploadTabs.tsx` (+18 -13) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/image_upload/index.ts` (+1 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/view_title/cover/CoverPopover.tsx` (+22 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/_shared/view_title/cover/ViewCover.tsx` (+18 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageEmpty.tsx` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageRender.tsx` (+59 -43) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/ImageResizer.tsx` (+2 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/image/UploadPopover.tsx` (+13 -6) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/components/blocks/math_equation/MathEquation.tsx` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/editor/editor.scss` (+5 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/utils/mui.ts` (+4 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/utils/upload_image.ts` (+9 -0) 📝 `frontend/resources/translations/en.json` (+3 -2) </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/59f416e8-d309-4138-8b94-05bc3c51ff15 - [x] Support uploading local images and backing them up - [ ] Uploading cloud images is not supported (Implement the login function first) <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [ ] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [ ] I've listed at least one issue that this PR fixes in the description above. - [ ] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:23:21 +00: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
AppFlowy-IO/AppFlowy#6467
No description provided.