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

PROFILE_IMAGE_BACKEND settings disappeared after v16.0.4 #46

Open
dyudyunov opened this issue Aug 29, 2024 · 2 comments
Open

PROFILE_IMAGE_BACKEND settings disappeared after v16.0.4 #46

dyudyunov opened this issue Aug 29, 2024 · 2 comments
Assignees

Comments

@dyudyunov
Copy link

The PROFILE_IMAGE_BACKEND settings were present from the v14 to v16.0.4 (latest before v17).

Here is the PR where it was added and the merge commit from it.

But they are absent starting from v17 and now I can reproduce the issue from the mentioned PR (an uploaded profile picture disappears after the redeploy because it is stored locally).

I checked the repo several times but don't know what I'm missing here. What happened? Why did the setting disappear?

Notes:

  • without updated PROFILE_IMAGE_BACKEND settings profile images will be stored locally and lost after the next deployment on k8s installations.
  • I tested it with redwood.2 release (tutor v18.1.3, minio v18.0.0)
@DawoudSheraz
Copy link

Hi. The setting was removed when upgrading to quince to fix an issue with profile photos. It seems some items might still be needed.

@dyudyunov
Copy link
Author

dyudyunov commented Aug 30, 2024

Just for history - here is my working profile image backend config:

PROFILE_IMAGE_BACKEND = {
    "class": DEFAULT_FILE_STORAGE,  # "storages.backends.s3boto3.S3Boto3Storage"
    "options": {
        # The bucket name value corresponds to default value of {{ MINIO_BUCKET_NAME }} - the only public bucket
        # https://github.com/overhangio/tutor-minio/blob/master/tutorminio/templates/minio/tasks/minio/init.sh#L6C31-L6C48 AFAIK
        "bucket_name": "openedx",  
        "querystring_auth": False,
        "location": PROFILE_IMAGE_BACKEND["options"]["location"].lstrip("/"),
    },
}

I was unable to use the private bucket + querystring_auth because of the SignatureDoesNotMatch error.

As I understood from the shallow investigation - querystring_auth doesn't work because _get_profile_image_urls appends additional querystring kwarg &v=.... If you remove it from the URL - signature works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants