Skip to content

Commit

Permalink
Merge pull request #14 from hdoro/feat/sanity-v3
Browse files Browse the repository at this point in the history
Release Sanity v3 version
  • Loading branch information
hdoro authored Dec 1, 2023
2 parents 080db01 + 5d0f899 commit baab92d
Show file tree
Hide file tree
Showing 122 changed files with 14,667 additions and 22,713 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
build
lib
node_modules
.yarn
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.js
**/*.lerna_backup
lerna-debug.log
lerna-debug.log
.DS_STORE
.turbo
.env
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
⚠️ **Poorly documented v3 version in the [feat/sanity-v3 branch](https://github.com/hdoro/sanity-plugin-external-files/tree/feat/sanity-v3)**
# sanity-plugin-external-files

# sanity-plugin-external-dam
Series of plugins for working with media files hosted elsewhere inside of Sanity.

Series of plugins for working with media files hosted elsewhere inside of Sanity - _currently only audio and video are supported_. Use one of the existing implementations or write your own!

![Screenshot of the plugin](https://raw.githubusercontent.com/hdoro/sanity-plugin-external-dam/main/screenshots.png)
![Screenshot of the plugin](https://raw.githubusercontent.com/hdoro/sanity-plugin-external-files/main/screenshots.png)

## Existing implementations

List of vendors currently supported:

- AWS S3 -> [sanity-plugin-s3-dam](https://github.com/hdoro/sanity-plugin-external-dam/tree/main/packages/aws)
- Google Firebase -> [sanity-plugin-firebase-dam](https://github.com/hdoro/sanity-plugin-external-dam/tree/main/packages/firebase)
- DigitalOcean Spaces -> [sanity-plugin-digital-ocean-files](https://github.com/hdoro/sanity-plugin-external-dam/tree/main/packages/digital-ocean)
- AWS S3 -> [sanity-plugin-s3-files](https://github.com/hdoro/sanity-plugin-external-files/tree/main/packages/aws)
- Google Firebase -> [sanity-plugin-firebase-files](https://github.com/hdoro/sanity-plugin-external-files/tree/main/packages/firebase)
- DigitalOcean Spaces -> [sanity-plugin-digital-ocean-files](https://github.com/hdoro/sanity-plugin-external-files/tree/main/packages/digital-ocean)

Use one of the existing implementations or write your own!

## Creating your own implementation

I'm yet to properly document how to create your own implementation, so please reach out if you're looking into doing it! You can get a hold of me at [opensource@hdoro.dev](mailto:opensource@hdoro.dev) or by [messaging me in the Sanity Slack community](https://sanity-io-land.slack.com/team/UB1QTEXGC).
I'm yet to properly document how to create your own implementation, so please reach out if you're looking into doing it! You can get a hold of me at [opensource@hdoro.dev](mailto:opensource@hdoro.dev).

While that documentation gets sorted out, be sure to take a look at the configuration for the [Firebase plugin](https://github.com/hdoro/sanity-plugin-external-dam/blob/main/packages/firebase/src/config.ts) and for the [S3 plugin](https://github.com/hdoro/sanity-plugin-external-dam/blob/main/packages/aws/src/config.ts).
While that documentation gets sorted out, be sure to take a look at the configuration for the [Firebase plugin](https://github.com/hdoro/sanity-plugin-external-files/blob/main/packages/firebase/src/config.ts) and for the [S3 plugin](https://github.com/hdoro/sanity-plugin-external-files/blob/main/packages/aws/src/config.ts). The core plugin does the heavy lifting: the full implementation of the DigitalOcean plugin is 330 lines of code, including types and documentation ✨

## Roadmap

From my own standpoint and use cases, this _plugin is feature complete_.

That said, I'm willing to develop it further given the interest and resources. Here's a list of features and improvements we could pursue:

- **Support for images, PDFs and other file types** other than video and audio
- I personally didn't consider these for the first launch as Sanity-native images are way more powerful than any regular storage vendors and I haven't had the use-case for others
- **Synchronizing files** uploaded to vendors outside of Sanity
- ✨ Solves: this would make it possible to have multiple entries to your storage buckets and using Sanity as the single source of truth. A significantly better experience than opening AWS S3's console and managing files there, for example.
- This actually doesn't involve much code on the plugin side. It'd be more about providing a blessed path for implementing webhooks in a simpler way by developers.
- If you already have this demand, just take a look at your used plugin's schema and try to build a handler for new files in your vendor that creates documents in Sanity following that schema.
- New vendors
- Previews for PDFs and other file types
- **New vendors**
- I'd love to suport [Cloudflare's R2 Storage](https://blog.cloudflare.com/introducing-r2-object-storage/) & Supabase

## Contributing
Expand All @@ -42,3 +41,5 @@ I'm a newbie with collaborating on open-source, so no strict rules here other th
## Acknowledgments

Immense gratitude to Akash Reddy and the folks at Playy.co for sponsoring the initial work for this plugin and helping shape it. You gave me the first opportunity to do paid open-source work and this won't be forgotten 💚

Also shout-out to Daniel, José and the great folks at [Bürocratik](https://burocratik.com/) for sponsoring the Sanity V3 upgrade of this plugin.
Loading

0 comments on commit baab92d

Please sign in to comment.