-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Initial WIP on improving the File model to use more native disk methods #141
base: develop
Are you sure you want to change the base?
Conversation
|
*/ | ||
public function getWidthAttribute() | ||
public function getWidthAttribute(): string|int|null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you consider changing the width and height attribute to be optional when using an s3 driver in some form. These 2 attributes make any remote storage take more than 7 seconds because it has to download the file locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually nvm, I can just override it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could store that data on upload theoretically and retrieve it from metadata instead of recalculating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, if that's the case, wouldn't it also be beneficial to have a has_thumb
meta parameter to indicate if the image has a thumbnail or not.
Currently the way I have it is that I have a has_thumb
property on the file model. so rather than using hasFile
which checks the remote file location it checks if that parameter is set, then I offload the thumbnail generation to a queue (this is more of a custom solution for me that im utilizing, but using hasFile
slows down the process a lot.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably add a metadata
column in the form of a JSON blob to store this sort of information
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. |
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. |
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. |
WIP