InvenTree/InvenTree/company
bloemp e1d1b51936
Various fixes to the "Download image from URL" functionality (#4101)
* Various fixes to the "Download image from URL" functionality

This commit adds an user-agent string to the download request wich prevents some sites from
returning a 403 (forbidden) status.
Clicking the download button on the thumbnail, also showed the thumbnail because the event wasn't stopped.
The parts thumbnail didn't update after a succesfull download of the image, reloadImage was never called.

* Fixed copy and paste errors in previous commit

* Reverted back the user-agent  immitation from the previous commit

* Add a user-agent overide setting

Add a setting to allow overiding the default user-agent  that is used for downloading images and files from a URL

* Fixed a typo in the description

* Another typo fixed

* Removed cast to string to prevent using 'None' as the user-agent

* Thumbnail delete button not visible after upload

The delete button on the image thumbnails of both parts and companies
isn't showing when we upload a new image. This is fixed by always
including the element on the page, and use javascript to show and hide
the element.
2022-12-24 23:17:04 +11:00
..
fixtures fix endline 2022-05-20 13:35:07 +02:00
migrations Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
templates/company Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Search field fix for admin interface (#3976) 2022-11-21 21:52:05 +11:00
api.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
apps.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
models.py Add unit test for deleting part which has pricing information (#3986) 2022-12-13 11:07:35 +11:00
serializers.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
test_api.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
test_migrations.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
test_views.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
tests.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
urls.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
views.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00