Skip to content

Add Netlify background upload scaffolding#77

Merged
snissn merged 5 commits intomasterfrom
issue-76-netlify-foc-uploader
Mar 25, 2026
Merged

Add Netlify background upload scaffolding#77
snissn merged 5 commits intomasterfrom
issue-76-netlify-foc-uploader

Conversation

@snissn
Copy link
Copy Markdown
Contributor

@snissn snissn commented Mar 25, 2026

Closes #76

Summary

This is the first implementation slice for Netlify-hosted Filecoin Onchain Cloud uploads without a VPS.

Included here

  • THS support for app.deploy.netlify.uploads
  • linting that requires app.features.uploads=true when Netlify uploads are configured
  • th build emission of:
    • netlify.toml
    • Netlify function scaffolding for upload start/status/background worker
    • a small generated deployment README
  • manifest upload endpoint wiring for the generated Netlify paths
  • microblog example opt-in to the Netlify upload deployment target
  • tests for THS validation/lint and build artifact emission

Next

  • validate/improve the generated Netlify function runtime behavior against a real Netlify deployment
  • tighten docs and deployment ergonomics
  • wire any remaining provider/runtime edge cases

@snissn snissn marked this pull request as ready for review March 25, 2026 04:59
@snissn
Copy link
Copy Markdown
Contributor Author

snissn commented Mar 25, 2026

Live Netlify validation completed against the generated microblog deploy.

Validated site:

What was verified:

  • GET /__tokenhost/upload returns enabled filecoin_onchain_cloud / netlify-background status
  • POST /__tokenhost/upload returns 202 with a jobId
  • polling /__tokenhost/upload-status?jobId=... settles to ok: true
  • final payload includes a real gateway URL + CID from FOC

Concrete success payload from the live job:

  • url: https://caliberation-pdp.infrafolio.com/piece/bafkzcibev7macddl4bkyuusf4s4sjhecf25pci65736ydw7bctgpgodau7oxqtm2g4
  • cid: bafkzcibev7macddl4bkyuusf4s4sjhecf25pci65736ydw7bctgpgodau7oxqtm2g4

Final fix in this push:

  • generated Netlify worker now writes the foc-cli config file directly in the function temp HOME instead of relying on broken wallet init behavior in a fresh serverless runtime.

@snissn snissn merged commit afc0386 into master Mar 25, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

Add Netlify background-function uploader for Filecoin Onchain Cloud

1 participant