Beskrivelse
DigiExpert8 Forms File Uploader for OneDrive is an independent plugin and is not affiliated with, endorsed by, or sponsored by Microsoft.
The plugin provides:
- Microsoft OAuth2 connection flow for OneDrive.
- Gravity Forms, WPForms, and Contact Form 7 file upload support.
- Form ID and Field ID filtering per provider.
- Folder templates always control the OneDrive folder path and support placeholders:
{form_title},{provider},{form_id},{entry_id},{date},{submission_folder}. - Field placeholders are supported, including Gravity Forms and WPForms values like
{field_3}, Gravity sub-inputs like{field_1_3}, and name-based placeholders like{passport_number},{full_name}, or{applicant_name}. - Optional Gravity Forms entry PDF summary upload.
- Optional local file deletion after successful upload.
- Encrypted storage for client secret and tokens.
External Services
This plugin connects to Microsoft OneDrive through Microsoft Graph.
It sends data to Microsoft only when:
* an administrator clicks Connect OneDrive and completes OAuth authorization
* a configured form submission triggers a file upload to OneDrive
* optional Gravity Forms PDF summary upload is enabled and a PDF summary is uploaded
Data sent to Microsoft may include:
* OAuth authorization data required to obtain access and refresh tokens
* uploaded file contents
* remote folder and file names built from plugin settings and form submission context
Folder template examples:
* {form_title}_{field_3}_{field_48}_{entry_id}
* IDLV_Alex Smith_A1234567_987
* {form_title}_{full_name}_{passport_number}_{entry_id}
* {provider}/{form_id}/{field_3}/{entry_id}
* {provider}/{form_id}/{field_1_3}-{field_1_6}/{entry_id}
* {provider}/{form_id}/{submission_folder}
Service provider:
* Microsoft OneDrive / Microsoft Graph
Service documentation and terms:
* Microsoft Graph: https://learn.microsoft.com/graph/overview
* Microsoft Terms of Use: https://www.microsoft.com/servicesagreement
* Microsoft Privacy Statement: https://privacy.microsoft.com/privacystatement
Troubleshooting
AADSTS50011redirect mismatch:- The Redirect URI in Entra must exactly match the plugin value, including protocol (
https://), domain, path, and trailing slash behavior.
- The Redirect URI in Entra must exactly match the plugin value, including protocol (
OneDrive connection failedafter clicking Connect:- Save settings first and confirm Tenant ID, Client ID, and Client Secret are not empty.
- If secret is regenerated in Entra, paste new secret Value in plugin and save again.
- Permission errors from Graph:
- Confirm
Files.ReadWriteis delegated permission (not application permission). - Confirm consent was granted in the same tenant/account you sign in with.
- Confirm
- Upload size issues:
- Current upload call uses Microsoft Graph simple upload (
PUT .../content), which supports up to 250 MB per file. - Resumable/chunked upload sessions are not implemented in this plugin version.
- Current upload call uses Microsoft Graph simple upload (
Security Notes
- Only users with
manage_optionscan configure or connect OneDrive. - OAuth state is validated to prevent CSRF.
- Settings forms and actions use WordPress nonces.
- Secrets and tokens are encrypted at rest using site salts.
- Upload path building sanitizes all path segments.
- Local path resolution is restricted to the WordPress uploads directory.
Known Limits
- This version uploads immediately on form completion.
- Large/resumable upload sessions are not yet implemented.
- Upload retries/queue management are not yet implemented.
Installation
- Copy
digiexpert8-forms-file-uploader-for-onedriveinto/wp-content/plugins/. - Activate the plugin in WordPress admin.
- Open
DigiExpert8 Forms File Uploader for OneDrivein the WordPress admin menu. - Follow the detailed setup steps below.
Anmeldelser
Der er ingen anmeldelser for denne widget.
Bidragsydere & udviklere
“DigiExpert8 Forms File Uploader for OneDrive” er open source-software. Følgende personer har bidraget til dette plugin.
BidragsydereOversæt “DigiExpert8 Forms File Uploader for OneDrive” til dit eget sprog.
Interesseret i udvikling?
Gennemse koden, tjek SVN repository, eller abonner på udviklerloggen via RSS.
Ændringslog
1.1.4
- Preserved existing refresh tokens when Microsoft token refresh responses do not include a replacement refresh token.
- Improved local upload URL resolution for protocol/domain aliases, encoded filenames, and query strings.
- Fixed fallback URL downloads being rejected before upload when a form plugin returns a URL that cannot be mapped directly to the uploads directory.
- Improved WPForms and Contact Form 7 uploaded file detection for newer/nested file payloads.
1.1.3
- Made the configured Folder Template authoritative for OneDrive folder paths across providers.
- Added form title and field placeholder support for folder templates, including Gravity Forms, WPForms, and Contact Form 7 field values.
- Changed the default folder template to
{form_title}_{field_3}_{field_48}_{entry_id}with updated admin examples. - Removed automatic duplicate-folder suffixing so deterministic templates stay unchanged.
1.1.2
- Added WordPress.org submission polish for external service disclosure and public metadata.
1.1.1
- Added WordPress.com Marketplace-friendly metadata headers.
- Added Plugins screen Settings link.
- Added non-breaking extension hooks for upload context and Gravity Forms folder/file customization.
- Updated debug logging to prefer WooCommerce logger when available.
1.1.0
- Added optional Gravity Forms entry PDF summary upload to the same OneDrive submission folder.
- Added admin setting to enable or disable Gravity Forms PDF summary upload.
- Kept existing file-upload behavior unchanged by default.
1.0.0
- Initial production release.
