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

Create easier way to upload media #152

Open
moorepants opened this issue Sep 5, 2024 · 8 comments
Open

Create easier way to upload media #152

moorepants opened this issue Sep 5, 2024 · 8 comments

Comments

@moorepants
Copy link
Contributor

Websites require binary media files (images, movies, etc) and it is generally a bad approach to store such files in a git repository. My method has been to upload media files to my personal dreamhost object store (dreamobject). It would be nice if there was a drag and drop way for students to add media files to the website.

We may be able to find a GUI program that can be used to upload files, for example: https://github.com/cloudlena/s3manager

@moorepants
Copy link
Contributor Author

This is a possibly alternative that might be better than our script:

https://github.com/rclone/rclone

@moorepants
Copy link
Contributor Author

I just tried rclone and it comes with a little GUI "rclone-browser" that seems to do the trick. Here are ubuntu instructions (you can install for other OS's from the rclone website).

sudo apt install rclone rclone-browser
rclone config

When configuring:

  1. new remote
  2. name: mechmotum
  3. type, 5: amazon
  4. subtype: 8 dreamhost option
  5. give access key and secret key at command line
  6. no region, press enter
  7. choose only dreamhost enpoint 1
  8. leave location constraint blank
  9. for acl, choose 2 for "public-read" all things we push to this bucket can be seen publicly on the web

Now open the browser:

rclone-browser

Refresh the remotes. You should see:

Image

Now select "mechmotum" and you should see:

Image

You can add files to the mechmotum bucket there. Please leave the other buckets alone. Also, don't delete anything from the buckets. Just add.

@moorepants
Copy link
Contributor Author

@Eimolgon can you try out rclone. If this works for you, then we can make this the recommendation for uploading website assets.

@moorepants
Copy link
Contributor Author

@chris-konrad maybe you want to try this out also, since you are the only other person to successfully upload things to my buckets.

@Eimolgon
Copy link
Contributor

Yes, it works well.
Note that "Dry run" is for testing and "Run" is for permanent action.

@moorepants
Copy link
Contributor Author

We should make the exact instructions for the various buttons in the rclone. I noticed you could copy or overwrite, etc. Not sure what best settings are yet.

@moorepants
Copy link
Contributor Author

I think these may be the settings we desire:

Image

Make sure the assets/* folder contents is mirrored to the mechmotum/* bucket, only copy, and don't overwrite if the file exists and/or it is newer in the bucket.

@moorepants
Copy link
Contributor Author

We need to figure out a way to prevent people from deleting files with the rclone.

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

2 participants