Skip to content

Conversation

@vual
Copy link
Contributor

@vual vual commented Oct 4, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

当未把s3存储桶设成公共读时,需要每次生成带签名的预览地址,默认有效期2小时

1728011233998

📝 补充信息 | Additional Information

@vercel
Copy link

vercel bot commented Oct 4, 2024

@vual is attempting to deploy a commit to the LobeChat Community Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 4, 2024
@lobehubbot
Copy link
Member

👍 @vual

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@codecov
Copy link

codecov bot commented Oct 4, 2024

Codecov Report

Attention: Patch coverage is 51.85185% with 13 lines in your changes missing coverage. Please review.

Project coverage is 92.03%. Comparing base (ea422d8) to head (2af5e22).
Report is 60 commits behind head on main.

Files with missing lines Patch % Lines
src/server/modules/S3/index.ts 0.00% 11 Missing ⚠️
src/server/utils/files.ts 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4254      +/-   ##
==========================================
- Coverage   92.29%   92.03%   -0.27%     
==========================================
  Files         496      497       +1     
  Lines       36194    36334     +140     
  Branches     2330     2182     -148     
==========================================
+ Hits        33407    33441      +34     
- Misses       2787     2893     +106     
Flag Coverage Δ
app 92.03% <51.85%> (-0.27%) ⬇️
server 97.34% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否有必要允许设置自定义的默认有效期?

@arvinxx
Copy link
Member

arvinxx commented Oct 10, 2024

相关问题: #3753

@arvinxx arvinxx changed the title 当未把s3存储桶设成公共读时,需要每次生成带签名的预览地址,默认有效期2小时。 ⚡️ perf: support use signedUrl for S3 if bucket is not public-read Oct 10, 2024
@arvinxx arvinxx changed the title ⚡️ perf: support use signedUrl for S3 if bucket is not public-read ⚡️ perf: support to use signedUrl for S3 if bucket is not public-read Oct 10, 2024
@vual
Copy link
Contributor Author

vual commented Oct 11, 2024

是否有必要允许设置自定义的默认有效期?

我觉得是有必要的,这个参数是可选,没填默认2小时(这个2小时可以斟酌下,是否改成其它值),但可能某些文件,比如图片,我可能想让他可预览的时间长一些,就可以配置时间长点。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is it necessary to allow setting a custom default validity period?

I think it is necessary. This parameter is optional. If not filled in, the default is 2 hours (you can consider whether to change this 2 hours to other values), but I may want some files, such as pictures, to be previewable. The longer the time, the longer the configuration time can be.

@arvinxx
Copy link
Member

arvinxx commented Oct 12, 2024

ci 挂了,得修下测试

我觉得是有必要的,这个参数是可选,没填默认2小时(这个2小时可以斟酌下,是否改成其它值)

那要不加一个 S3 环境变量来配置这个吧?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ci is down, I need to fix it and test it.

I think it is necessary. This parameter is optional. If not filled in, the default is 2 hours (you can consider whether to change this 2 hours to other values)

How about adding an S3 environment variable to configure this?

vual added 2 commits October 12, 2024 11:01
…enerated each time,fix test ts,add param to defined s3 preview url expires in.
@vual
Copy link
Contributor Author

vual commented Oct 12, 2024

ci 挂了,得修下测试

我觉得是有必要的,这个参数是可选,没填默认2小时(这个2小时可以斟酌下,是否改成其它值)

那要不加一个 S3 环境变量来配置这个吧?
修复了,变量也添加了,S3_PREVIEW_URL_EXPIRE_IN

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ci is down and needs to be repaired and tested.

I think it is necessary. This parameter is optional. If not filled in, the default is 2 hours (you can consider whether to change this 2 hours to other values)

How about adding an S3 environment variable to configure this?
Fixed, variable added, S3_PREVIEW_URL_EXPIRE_IN

@arvinxx
Copy link
Member

arvinxx commented Oct 14, 2024

ci 还是挂的呀?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is ci still down?

@vual
Copy link
Contributor Author

vual commented Oct 14, 2024

ci 还是挂的呀?

抱歉,现在可以了。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


ci is still down?

Sorry, that's OK now.

@vercel
Copy link

vercel bot commented Oct 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2024 3:54am

@arvinxx arvinxx merged commit 7204296 into lobehub:main Nov 3, 2024
6 of 8 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @vual ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.26.18 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Sun-drenched
Copy link

Sun-drenched commented Nov 13, 2024

请问,如果启用这个特性,当开始对话时上传的图片(文件链接)到期后,是否就无法继续这个对话也无法在另外的对话中添加这张图片?是否需要重新上传文件以“续期”?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I would like to ask, if this feature is enabled, will it be impossible to continue the conversation after the image (file link) uploaded when starting the conversation expires (large models cannot read images from expired links)? Do I need to re-upload the file to "renew"?

@arvinxx
Copy link
Member

arvinxx commented Nov 13, 2024

@Sun-drenched 不是,仍然继续可用的

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@Sun-drenched No, it will still be available

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants