-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(files): avoid duplicated fetch during preview #2254
Conversation
@@ -214,7 +214,7 @@ const actions = () => ({ | |||
...fileFromStats({ ...stats, path }), | |||
fetched: time, | |||
type: 'file', | |||
read: () => ipfs.cat(stats.cid), | |||
read: (offset, length) => ipfs.cat(stats.cid, { offset, length }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this CI action is failing but this is not a TS file.. we could add jsdoc..
do we want to disable typecheck CI while we are not full typescript?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it, we get contributions from people, and better if they include types (easier for us to review).
I've added jsdoc.
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
## [4.3.1](v4.3.0...v4.3.1) (2024-09-23) CID `bafybeideglc722hiwhsy4kiyl2fivf5lr6wozy2iuixtgzkvl3v4hasaty` --- ### Bug Fixes * **file-preview:** safeSubresourceGwUrl ([#2253](#2253)) ([bb861a3](bb861a3)), closes [/github.com//issues/2246#issuecomment-2322192398](https://github.com/ipfs//github.com/ipfs/ipfs-webui/issues/2246/issues/issuecomment-2322192398) * **files:** avoid duplicated fetch during preview ([#2254](#2254)) ([eefae25](eefae25)), closes [#2217](#2217) * **files:** prefer subdomain gw in copied share links ([#2255](#2255)) ([e8c4421](e8c4421)) ### Trivial Changes * .io → .tech ([b9f622d](b9f622d)) * browserslist@latest ([#2251](#2251)) ([809c55a](809c55a)) * Pull transifex translations ([#2258](#2258)) ([2250374](2250374)) * use ipld-explorer-components@7.0.2 ([#2257](#2257)) ([99ba9ac](99ba9ac))
🎉 This PR is included in version 4.3.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
ipfs.cat
if file is embedded as subresource (image, video, pdf, audio)ipfs.cat
to 10KiB for other files typesPreview
Can be tested with big txt file, like
bafybeicbevt3gr2jhs23f2sikwcqtirrhrdyscriutfg5mtlxoud55htii