InvenTree/InvenTree
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
..
InvenTree Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
build List PO/SO/BO by reference in API (#4083) 2022-12-21 21:48:30 +11:00
common Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
company Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
label Improvements for docker / gunicorn (#4031) 2022-12-08 23:06:02 +11:00
locale New Crowdin updates (#4082) 2022-12-22 12:47:39 +11:00
order Replace include tag by the files contents (#4093) 2022-12-22 09:17:08 +11:00
part Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
plugin remove offending test (#4100) 2022-12-22 12:07:33 +11:00
plugins Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
report Adds a report template tag for dict access (#3905) 2022-11-07 21:24:25 +11:00
script Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
stock Fix stock location structural check (#4089) 2022-12-21 23:30:23 +11:00
templates Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
users Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
config_template.yaml Added config setting for logout redirect url (#3995) 2022-11-26 10:41:28 +11:00
gunicorn.conf.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
manage.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00