Skip to content
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

IrysUploader URI doesn't exists #150

Open
sineus opened this issue Sep 10, 2024 · 3 comments
Open

IrysUploader URI doesn't exists #150

sineus opened this issue Sep 10, 2024 · 3 comments

Comments

@sineus
Copy link

sineus commented Sep 10, 2024

After downloading, I have a URI like arweave.net/{:id} but it doesn't work... What can I do? Has Arweave changed the composition of its URLs?

Create umi instance with IrysUploader

const connection = new Connection(RPC);

const umi = createUmi(connection)
  .use(mplCore())
  .use(
    irysUploader({
      timeout: 60000,
    })
  );

const keypair = umi.eddsa.createKeypairFromSecretKey(
  new Uint8Array(SOLANA_WALLET)
);
const signer = createSignerFromKeypair(umi, keypair);

umi.use(signerIdentity(signer));

Get uploaded file and create generic file to upload with umi uploader adapter

const fileBuffer = readFileSync(req.file.path);
    const filename = req.file.originalname;
    const extension = extname(filename);
    const contentType = req.file.mimetype;

    const [uri] = await umi.uploader.upload([
      createGenericFile(fileBuffer, filename, {
        contentType,
        extension,
      }),
    ]);

Then, I get URI like https://arweave.net/{:id} but when I access it, arweave tells me the URL doesn't exist...

See this PR

@luke-mjtd
Copy link

I have the same issue. I've tried to replace https://arweave.net/<id> with https://gateway.irys.xyz/<id> and it seems to work as it's referenced in the PR linked above. Waiting for the PR approval to remove my workaround.

@mikhd
Copy link

mikhd commented Sep 11, 2024

Experiencing the same issue on the devnet, gateway.irys.xyz urls work, whereas arweave.net from umi doesn't.

@dtfiedler
Copy link

dtfiedler commented Sep 25, 2024

setting the URL to http://turbo.ardrive.io should fix this - Turbo has a tight integration with http://arweave.net & is supported by the ar.io team

const umi = createUmi(connection)
  .use(mplCore())
  .use(
    irysUploader({
      url: "https://turbo.ardrive.io",
      timeout: 60000,
    })
  );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants