Uploading from the admin panel
@Marjolaine was describing an issue where the client uploads a logo using the sib-form
on the front-end. They can edit the logo to an existing web url (e.g. from Google images), but they can't select a local file to upload, like so:
How to do this now This is possible to work-around
-
Select add new DjangoLDP_Uploader Document in the admin panel
-
Select the file to upload and then select 'save and continue editing'
-
Return to the model, and paste the URL id into the logo field, and save
A cleaner solution
- Make a new Field
UploadedDocumentURL
, which extends Django'sURLField
, without changes -
Override the form-field of
UploadedDocumentURL
to provide a custom widget which displays a file upload alongside a URL text input (the current value displayed here)
Estimation: 2-4 hours
@sylvain @balessan what do you think? This is perhaps a lot of coding to improve the admin panel UX