You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
I noticed your project, thanks for contributing to the Shrine ecosystem! 😃
I just wanted to give one suggestion about the direction of implementing this feature. The way that it's currently written, it will only work for FileSystem storage, because that's the only one for which the io will be a File object. It could work for remote storages by downloading the file, but that would be very slow if we want to display it on the page.
My proposal is that, instead of having this defined on UploadedFile and extracted ad-hoc, to extract it as metadata before upload. For example, if user is processing versions, that they can extract dominant color of a single version (just like in the carrierwave-color readme):
This plugin could perhaps automatically do that under-the-hood. This way fetching the dominant color would be instant for any kind of storage, because it you would be just reading the metadata value. What do you think about it?
The text was updated successfully, but these errors were encountered:
I'm not actually sure this is working as @janko intended? For me, the io object is still an UploadedFile and I get:
NoMethodError Exception: undefined method `path' for #<ImageUploader::UploadedFile:0x00007fadb7bccdb8>
Mind you, I am doing direct to S3 uploads. Does that flow ever download the full file? I figured the promote stage still does download the file and I could extract the dominant color there.
Hey there,
I noticed your project, thanks for contributing to the Shrine ecosystem! 😃
I just wanted to give one suggestion about the direction of implementing this feature. The way that it's currently written, it will only work for FileSystem storage, because that's the only one for which the
io
will be a File object. It could work for remote storages by downloading the file, but that would be very slow if we want to display it on the page.My proposal is that, instead of having this defined on
UploadedFile
and extracted ad-hoc, to extract it as metadata before upload. For example, if user is processing versions, that they can extract dominant color of a single version (just like in the carrierwave-color readme):This plugin could perhaps automatically do that under-the-hood. This way fetching the dominant color would be instant for any kind of storage, because it you would be just reading the metadata value. What do you think about it?
The text was updated successfully, but these errors were encountered: