Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

File limit 250kb #1365

Closed
Artod opened this issue May 26, 2018 · 10 comments
Closed

File limit 250kb #1365

Artod opened this issue May 26, 2018 · 10 comments
Assignees
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked

Comments

@Artod
Copy link

Artod commented May 26, 2018

  • Version: 0.28.2
  • Platform: Chrome and Firefox on Windows 10 (64-bit)

Type: Bug

Severity: High

Description:

I use js-ipfs for this project https://github.com/osliki/classi with following configs:

const config = {
    repo: 'osliki-classi',
    start: true,
    EXPERIMENTAL: {
      pubsub: true,
      relay: {
        enabled: true,
        hop: {
          enabled: true,
        }
      }
    },
    config: {
      Addresses: {
        Swarm: [
          '/dns4/wrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star',
          '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
        ]
      }
    }
  }

and seems like nodes unable to share photos larger than 250kB. Starting from here for such large files I got everlasting loading.

Thanks for any help!

@alanshaw
Copy link
Member

Hey @Artod are you sure it's the file size that's the issue? Do you have an example of a working image that is less than 250kB? Are you sure these hashes are available on the network?

@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/wizard Extensive knowledge (implications, ramifications) required status/ready Ready to be worked P2 Medium: Good to have, but can wait until someone steps up labels May 29, 2018
@Artod
Copy link
Author

Artod commented May 29, 2018

Hi @alanshaw. They are not available on network but available between browser nodes.

Example:

  1. Go here https://osliki.github.io/classi/
  2. Click "New 'all' column"
  3. If I will be online, you will see all images except 6th "Photo by Kaci Baum on U...".

I've tested:

  • Laptop A + Chrome <=> Laptop A + Firefox
  • Laptop A + Chrome <=> Laptop B + Chrome

Also you can clone repo, yarn install, yarn start (MetaMask on Rinkeby) and test it from different browsers locally.

About availability on network: if I got right, I need run my own go-ipfs node and, each time user uploads a file in the browser, make go-ipfs node fetch this file from the browser node. Correct?

Thank you!

@Artod
Copy link
Author

Artod commented May 31, 2018

@alanshaw small update.

I ran own go-ipfs node and added /dns4/bootstrap.osliki.net/tcp/443/wss/ipfs/QmfJB77qXfiEdJkaSxpZgiMh9kAPiDBj3ga7TxF72QdWtf to the config. Each time an user uploads photos in the browser, I make requests to the gateway of my go-ipfs node https://gateway.osliki.net/ipfs/${hash}, so files (including big ones) become available on the network and all browser nodes .

But issue is still relevant for the case

browser_node_A <= file_larger_than_250kB => browser_node_B

(when the go-ipfs node is down)

@alanshaw
Copy link
Member

alanshaw commented Jun 1, 2018

I'll look into this as soon as I get a sec. Can you please verify for me that this only happens for files larger than 250kB, and works fine for files that are smaller?

@Artod
Copy link
Author

Artod commented Jun 1, 2018

@alanshaw I've created a test page for testing https://osliki.github.io/250kb/

  • Open the link in different browsers
  • Select an img in the first browser
  • Copy the hash
  • Paste the hash in the second browser

Images larger than 250kb won't be loaded

@AquiGorka
Copy link
Member

This is exactly what I submitted here: #1307

More info: https://github.com/AquiGorka/test-ipfs-file-sharing

@autonome
Copy link
Contributor

This currently works, as shown in this example, which is hooked up to CI and tested with every js-ipfs change:

https://github.com/ipfs/js-ipfs/tree/master/examples/exchange-files-in-browser

@AquiGorka and @Artod can you confirm whether or not is still a problem for you? Should be working in contemporary versions!

@Artod
Copy link
Author

Artod commented May 21, 2020

@autonome My project where I used ipfs is closed for now, so I can't verify if it's still a problem. Feel free to close the issue if you sure everything is fine. Thank you for the update.

@AquiGorka
Copy link
Member

Hey @autonome thanks for the update, I remember talking to @jacobheun about this and he said it was on his radar. My project where this was a bug is also closed now, but I'm very happy this was solved. Cheers 🎉

@achingbrain
Copy link
Member

Closing as it seems like this issue was resolved.

@github-project-automation github-project-automation bot moved this from 🥞 Todo to ✅ Done in js-ipfs deprecation Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/wizard Extensive knowledge (implications, ramifications) required kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
No open projects
Status: Done
Development

No branches or pull requests

5 participants