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

Admin upload not displaying in Django 3.2 for versions 2+ #253

Open
tammyalexandra opened this issue Jun 17, 2022 · 3 comments
Open

Admin upload not displaying in Django 3.2 for versions 2+ #253

tammyalexandra opened this issue Jun 17, 2022 · 3 comments

Comments

@tammyalexandra
Copy link

In the admin the S3 direct upload form is not showing up -- it should appear in the space to the right of "Local image:" in the screenshot below:

image

All the markup for the element does appear in the source of the page. I discovered that the CSS from /static/s3direct/dist/index.css appears to be hiding it (what you see below is the CSS straight from the file; it was not modified by any JS that ran on the page).

image

Downgrading django-s3direct to 1.1.8 but keeping Django 3.2 restored the functionality of django-s3direct. No version of django-s3direct 2.0 or above works. Working versions suggest that JS runs after the page loads to display the form elements. I am not getting any JS errors in the browser.

I do not have any custom code running in my admin, and I confirmed that all my code and configuration matches the documentation for the newer versions of django-s3direct.

Thanks for any help you can provide untangling this.

@bradleyg
Copy link
Owner

Does the example work for you? (with Django 3.2). I just tried it and couldn't recreate the issue.

@bradleyg
Copy link
Owner

Managed to recreate. Could you try again with the latest version?

@tammyalexandra
Copy link
Author

tammyalexandra commented Jun 17, 2022

Good news -- the form elements now show up and the image successfully gets uploaded. Thank you!

Bad news -- even after the image gets uploaded, the buttons to save the model containing the image are not un-grayed.

Screen Shot 2022-06-17 at 11 34 03 AM

I see a couple messages in the browser console likely related to whatever is happening:

I can confirm that https://s3.us-east-1.amazonaws.com/my/image/path/file.png is the file that was just successfully uploaded, & I can bring up in the image in my browser.

Thanks for your ongoing help with this!

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