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

Convenience UI for uploading avatars to S3 buckets #147

Closed
wants to merge 11 commits into from

Conversation

neon-glowstick
Copy link
Contributor

Objective

This PR adds a new Contrib folder for uploads and an implementation for uploading avatars to an S3 bucket.

To use the package add "org.basisvr.contrib.upload.s3": "file:../../Contrib/Upload/S3" to manifest.json.

image

The textfields are NOT serialized on the component. They are saved to a config file in Unitys PersistentDataPath locally on your machine. Use the Load/SaveDelete buttons to manage the config file.

I tested it with Cloudflare and a public R2 bucket in dev mode. Upload went fine and the avatar downloaded without issue into Basis.

Dependencies

I'm using the AWS S3 .net sdk to do the actual upload. It was downloaded using NugetForUnity then copied into the Contrib/Upload/S3/Editor/libraries folder. The AWS sdk packages are under the Apache 2.0 license, and the depend on Microsoft.Bcl.AsyncInterfaces which is under the MIT license.

Its not actually uploading yet, just tested that it writes and reads config
Removed extension method now that upload interacts with the editor progress bar
Response does not contain the url. We can try to construct a url, but it would be guesswork
The .asmdef will also prevent them from being included in a build, but this is extra explicit
@neon-glowstick neon-glowstick changed the title Convience UI for uploading avatars to S3 buckets Convenience UI for uploading avatars to S3 buckets Feb 13, 2025
@dooly123
Copy link
Collaborator

this is awesome, I think it needs to be on a separate repo however, (just so we don't add addons to the framework)

bring it up with me when you got some time at the meeting or on discord and we can discuss how that would look :)

@neon-glowstick
Copy link
Contributor Author

I've made this into a package here https://github.com/neon-glowstick/BasisVr-S3Hosting
My intent is to add support for uploading scenes and props as well.

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.

2 participants