Skip to content
This repository has been archived by the owner on Apr 16, 2019. It is now read-only.

Empty File after ipfs.files.write call #1

Open
Kyrrui opened this issue Jun 26, 2018 · 0 comments
Open

Empty File after ipfs.files.write call #1

Kyrrui opened this issue Jun 26, 2018 · 0 comments

Comments

@Kyrrui
Copy link

Kyrrui commented Jun 26, 2018

I'm using Infura's IPFS as a cache store. My caching script checks for new updates and writes the the mutable file system whenever a new update is found using ipfs.files.write. After about 5 days of this working successfully our cached file now shows up as empty, even when we write to it and the API call doesn't error.

ipfs.files.write('/' + IPFS_KEY + '/eventCache.json', Buffer.from(content), {create:true, truncate:true}, (err) => { if (!err) { console.log("Success!") console.log("Polling for new events...") isUpdatingIpfs = false; } })

data: refreshCache.js:2533 - New Create Events! data: refreshCache.js:2533 - Uploading to IPFS... data: refreshCache.js:2533 - Success! data: refreshCache.js:2533 - Polling for new events...

But the IPFS file is empty on read. The only solution I have right now is to start my cache back up at a different directory or to run my own IPFS server.

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

No branches or pull requests

1 participant