mirror of
https://github.com/shuaiplus/nodewarden.git
synced 2026-06-20 13:00:39 +00:00
feat: implement direct file upload for sends with JWT token validation
- Added `processSendFileUpload` function to handle file uploads for sends. - Integrated JWT token creation and verification for secure file uploads. - Updated `handleCreateFileSendV2` and `handleGetSendFileUpload` to use new upload URL generation. - Refactored upload handling in `handleUploadSendFile` and `handlePublicUploadSendFile` to utilize the new upload process. - Introduced `uploadDirectEncryptedPayload` for handling direct uploads with progress tracking. - Enhanced API routes to support both POST and PUT methods for attachment uploads. - Added localization strings for upload progress messages. - Created utility functions for direct upload URL building and payload parsing.
This commit is contained in:
@@ -913,11 +913,15 @@ export default function App() {
|
||||
onDownloadVaultAttachment: vaultSendActions.downloadVaultAttachment,
|
||||
downloadingAttachmentKey: vaultSendActions.downloadingAttachmentKey,
|
||||
attachmentDownloadPercent: vaultSendActions.attachmentDownloadPercent,
|
||||
uploadingAttachmentName: vaultSendActions.uploadingAttachmentName,
|
||||
attachmentUploadPercent: vaultSendActions.attachmentUploadPercent,
|
||||
onRefreshVault: vaultSendActions.refreshVault,
|
||||
onCreateSend: vaultSendActions.createSend,
|
||||
onUpdateSend: vaultSendActions.updateSend,
|
||||
onDeleteSend: vaultSendActions.deleteSend,
|
||||
onBulkDeleteSends: vaultSendActions.bulkDeleteSends,
|
||||
uploadingSendFileName: vaultSendActions.uploadingSendFileName,
|
||||
sendUploadPercent: vaultSendActions.sendUploadPercent,
|
||||
onChangePassword: accountSecurityActions.changePassword,
|
||||
onEnableTotp: async (secret: string, token: string) => {
|
||||
await accountSecurityActions.enableTotp(secret, token);
|
||||
|
||||
Reference in New Issue
Block a user