agritheory / cloud_storage

S3 protocol storage for Frappe Applications - compatible with S3, Backblaze and DO Spaces
https://agritheory.com/documentation/cloud_storage
Other
13 stars 7 forks source link

fix: add custom validate #76

Closed MyuddinKhatri closed 3 months ago

MyuddinKhatri commented 3 months ago

closes #75

Added custom_validate which is copy of super().validate() but it does not run validate_file_on_disk as in our case, file won't exist on disk.

Alchez commented 3 months ago

@MyuddinKhatri Can you also test what happens if cloud_storage is installed but the S3 credentials aren't configured?

MyuddinKhatri commented 3 months ago

@MyuddinKhatri Can you also test what happens if cloud_storage is installed but the S3 credentials aren't configured?

@Alchez If cloud_storage is installed and S3 credentials aren't configured then the file is stored traditionally on the disk, inside sites/

Alchez commented 3 months ago

@Alchez If cloud_storage is installed and S3 credentials aren't configured then the file is stored traditionally on the disk, inside sites/

@MyuddinKhatri Does the validate_file_on_disk function need to run in that case? I'm wondering if we should keep that function in our custom class but behind a flag maybe?

agritheory commented 3 months ago

Yes, we would want a flag. The preview features of Cloud Storage may be used as a dependency for other applications

MyuddinKhatri commented 3 months ago

@Alchez If cloud_storage is installed and S3 credentials aren't configured then the file is stored traditionally on the disk, inside sites/

@MyuddinKhatri Does the validate_file_on_disk function need to run in that case? I'm wondering if we should keep that function in our custom class but behind a flag maybe?

Yes, we should add a flag, and if the S3 credentials are not configured then run the 'validate_file_on_disk'

github-actions[bot] commented 3 months ago

💔 All backports failed

Status Branch Result
version-14 Cherrypick failed because the selected commit (bbd706bd) is empty. Did you already backport this commit?
version-15 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

backport --pr 76

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details