longjuan

Results 69 comments of longjuan

https://github.com/halo-sigs/plugin-s3 https://github.com/halo-sigs/plugin-alioss https://github.com/halo-sigs/plugin-sitemap https://github.com/halo-sigs/plugin-migrate https://github.com/halo-sigs/plugin-highlightjs https://github.com/halo-sigs/plugin-lightgallery https://github.com/halo-sigs/plugin-links https://github.com/halo-sigs/plugin-comment-widget https://github.com/halo-sigs/plugin-search-widget https://github.com/halo-sigs/plugin-umami (WIP) https://github.com/halo-sigs/plugin-unsplash https://github.com/halo-sigs/plugin-moments (WIP) https://github.com/halo-sigs/plugin-photos (WIP) https://github.com/halo-sigs/plugin-qiniu-kodo (WIP) https://github.com/halo-sigs/plugin-feed (WIP) https://github.com/halo-sigs/plugin-meilisearch (WIP) 均有这个问题,有空再弄吧,我这几天赶个论文初稿 /unassign

> 可能原因是三张图片默认粘贴到系统都叫image.png 本地存储的已经在https://github.com/halo-dev/halo/pull/3042 中修复了 https://github.com/halo-sigs/plugin-alioss 和 https://github.com/halo-sigs/plugin-s3 都没有对同名文件进行处理,导致同名文件只保留第一张或最后一张 这个问题可以通过先headobject查看是否存在同名文件,若同名可与本地存储一样报同名文件已存在错误 另外需不需要增加文件重命名功能,类似: ![image](https://user-images.githubusercontent.com/28662535/211285155-32d30196-043a-4dfa-924f-5cb512ab4dec.png) @JohnNiang @ruibaby

> IMO,建议暂时和本地上传的逻辑保持一致,通过 S3 上传的图片判断一下 object name 是否重复,如果重复则友好提示用户即可。 好的 /assign

> Hi @longjuan ,这个问题还需要在 console 端的上传组件还需要优化一下,对于直接粘贴的图片,需要用 `$UUID.png` 替换 `image.png`。 好的,我研究一下

> Hi @longjuan ,这个问题还需要在 console 端的上传组件还需要优化一下,对于直接粘贴的图片,需要用 `$UUID.png` 替换 `image.png`。 我看了一下,被命名为`image.png`似乎是浏览器行为。 在截图后或者其他地方复制一张图片(非本地文件),粘贴到uppy,捕获paste事件发现他name就是`image.png` ![image](https://user-images.githubusercontent.com/28662535/211713831-73c480b4-bfef-4a21-a970-17fd64258c55.png) 而在Firefox中会被命名为`图片.png` ![image](https://user-images.githubusercontent.com/28662535/211714091-a505d519-dd50-4fa1-9205-ccdb6a3ecefd.png) 在复制本地文件然后粘贴时,name就是本地文件名 ![image](https://user-images.githubusercontent.com/28662535/211714496-208dff7c-4afe-434d-93dc-b47b2e605769.png) 我想不到有什么好的办法处理不同浏览器的行为,大佬来看看吧 @ruibaby > 不知道Safari又会命名成什么

> 可能还是得在后端兼容同名的附件上传。无论是本地上传还是 OSS 上传。 什么策略,全部都要重命名还是重复了才重命名,是拼接时间戳吗?

我认为可以提供占位符的方式给用户比较好,s3 插件中文件重命名这种下拉框模式自由度太小,只提供了几种选择。

我觉得删了这个background就行 ![image](https://github.com/halo-dev/halo/assets/28662535/9a0f0d54-5bc6-41dd-ae1d-5b535d345b05) https://github.com/halo-dev/halo/blob/2178bd8b80d372ba2575176ac609e070ce5696f8/ui/console-src/modules/contents/pages/components/SnapshotContent.vue#L66

目前插件中的自封axios在遇到session过期后不会引导用户重新登录,且每个插件维护一个axios也很麻烦,希望能排上日程。