feat: add manual ID document upload for support admin [ENG-371]#21
feat: add manual ID document upload for support admin [ENG-371]#21forge0x wants to merge 3 commits into
Conversation
Nodirbek75
left a comment
There was a problem hiding this comment.
Upload failed with following errors:
-
account_management.js:1108 POST http://dev.localhost:8000/api/method/admin_panel.api.admin_api.upload_id_document?request_id=d7idjs707m 500 (INTERNAL SERVER ERROR)
-
Failed to load resource: the server responded with a status of 500 (INTERNAL SERVER ERROR)
Replaces Frappe-local file storage with DO Spaces for admin ID document uploads. Files are uploaded directly to Spaces via pre-signed URLs, avoiding Frappe's file system entirely. - account_management.js: upload button with XHR, resets to "Upload Another" on success - admin_api.py: upload_id_document generates pre-signed PUT URL via boto3, uploads file, saves fileKey on the upgrade request. get_id_document_url generates pre-signed GET URL via boto3 - graphql_client.py: removed ID document methods (no longer needed) - .gitignore: wkhtmltox exclusion
5494bb1 to
c86854c
Compare
brh28
left a comment
There was a problem hiding this comment.
Independent changes would ideally be there own PRs but no matter:
Regarding alert users: why are we removing notification types? Only "emergency" can be sent for what I can tell
Regarding id document upload: I see Nick is having testing issues, but I'm also curious what the use case is where admins are uploading the docs rather than going through the app
|
there should be no alert changes in here, I tried to remove those. regarding id document upload: its more for the migration process, we have a lot of users already KYC'd and we migrated their records without ID Documents from Supabase. The support team will need a button to upload the file to these migrated records as they get the IDs again. This was a one-time migration, so if there is a less intrusive way to handle it, i'm open to alternatives. |
Summary
Support staff can now upload ID documents manually from the Account Management page when the user hasn't submitted one.
Changes
upload_id_document(request_id)endpoint usingfrappe.upload_file.save_file()to save to Frappe's file systemid_documentis null and level is PRO/MERCHANT. Uses XHR + CSRF token for file upload, then switches to existing View document flowTesting
Note
No Flash API changes. Files stored in Frappe file system only.