You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"content": "For file and image fields use <code>UploadFile</code> and <code>UploadImage</code> widgets in <code>formfield_overrides</code>. Implement <code>upload_file(obj, field_name, file_name, file_content)</code> on the model admin to handle uploads; it must return the file URL (e.g. after saving to disk or S3).",
768
+
"content": "For file and image fields use <code>UploadFile</code> and <code>UploadImage</code> widgets in <code>formfield_overrides</code>. Implement <code>upload_file(field_name, file_name, file_content, obj=None)</code> on the model admin to handle uploads; it must return the file URL (e.g. after saving to disk or S3).",
769
+
},
770
+
{
771
+
"type": "text",
772
+
"content": "To customise the URL shown in the upload widget (e.g. generate an S3 presigned URL instead of displaying the raw <code>s3://</code> key), override <code>get_file_url</code> on the model admin. The display URL is emitted as <code>{field_name}__url</code> in the serialised object and passed to the widget as <code>valueRepr</code>; the raw stored value is never changed, so form saves are unaffected.",
0 commit comments