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

Store photos/big binaries in a Bucket #43

Open
kapil1garg opened this issue Jul 2, 2018 · 4 comments
Open

Store photos/big binaries in a Bucket #43

kapil1garg opened this issue Jul 2, 2018 · 4 comments
Assignees

Comments

@kapil1garg
Copy link
Contributor

Images fill up our MongoDB really quickly and becomes costly. Better to store it in a S3 or comparable bucket

@youralien
Copy link
Member

Our current storage package, Meteor Collection FS supports storing S3 files, through its S3 Storage Adapter.

@youralien
Copy link
Member

When we change how image upload works, we should also consider how many copies of images we really need to make. Currently, we are storing an original, image and thumb which are all different sizes.

meteor:PRIMARY> db.cfs.images.filerecord.find().pretty()
{
	"_id" : "PDwzaPPHAdcgNuaYc",
	"original" : {
		"updatedAt" : ISODate("2018-07-19T19:36:30.795Z"),
		"size" : 181945,
		"type" : "image/png"
	},
	"iid" : "K2pccgXy5u46gKhFZ",
	"uid" : "jEGoXwgP6avDkeThp",
	"lat" : 42.053872,
	"lng" : -87.683748,
	"needName" : "halfhalfNeed",
	"instance_id" : "30672",
	"uploadedAt" : ISODate("2018-07-19T19:36:31.347Z"),
	"metadata" : {
		"width" : 196,
		"height" : 392
	},
	"copies" : {
		"images" : {
			"type" : "image/png",
			"size" : 144753,
			"key" : "5b50e83f156f0f7bfc4b163e",
			"updatedAt" : ISODate("2018-07-19T19:36:31.979Z"),
			"createdAt" : ISODate("2018-07-19T19:36:31.979Z")
		},
		"thumbs" : {
			"type" : "image/png",
			"size" : 212387,
			"key" : "5b50e83f156f0f7bfc4b163f",
			"updatedAt" : ISODate("2018-07-19T19:36:32.159Z"),
			"createdAt" : ISODate("2018-07-19T19:36:32.159Z")
		}
	}
}```

@youralien
Copy link
Member

I was so close, but something about this s3 adapter is buggy 👎

A number of things are wacky:

  1. The two stores don't make a full sized image and a thumb. A square image is being created and being stored in the full images store.

@youralien
Copy link
Member

Could we revisit this? There is some AWS S3 Integration blog post written in June 2019:
https://github.com/VeliovGroup/Meteor-Files/wiki/AWS-S3-Integration

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