Skip to content

Conversation

@ErykKul
Copy link
Contributor

@ErykKul ErykKul commented Dec 5, 2025

What this PR does / why we need it:

This PR adds a standalone file uploader (DVWebloader V2) that can be built as an independent bundle and embedded in external pages. It reuses the existing FileUploaderPanelCore component to avoid code duplication.

Key features:

  • Standalone bundle: Single JS file (~1.5MB) that can be loaded independently from the main SPA
  • Shared components: Reuses FileUploaderPanelCore for the accordion uploader UI
  • API key authentication: Uses URL parameters for configuration (siteUrl, datasetPid, key)
  • S3 configuration: Supports window.dvWebloaderConfig for S3 tagging, retries, and timeout settings
  • Configurable S3 tagging: Can disable S3 tagging for storage backends that don't support it

Which issue(s) this PR closes:

Special notes for your reviewer:

Suggestions on how to test this:

  1. Build the standalone bundle: npm run build-uploader
  2. Serve the dist-uploader folder
  3. Open dvwebloaderV2.html?siteUrl=http://localhost:8080&datasetPid=doi:10.5072/FK2/XXXXX&key=YOUR_API_KEY
  4. Test file upload via drag-drop and file picker
  5. Verify files are added to the dataset

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Yes - adds a new standalone page for file uploads. The UI reuses the existing file uploader accordion from the SPA.

Is there a release notes or changelog update needed for this change?:

Yes - new feature: Standalone file uploader bundle for embedding in external pages (DVWebloader V2)

Additional documentation:

Configuration via window.dvWebloaderConfig (set in HTML before bundle loads):

window.dvWebloaderConfig = {
    useS3Tagging: true,      // Disable for S3 backends without tagging support
    maxRetries: 3,
    uploadTimeoutMs: 0,
    disableMD5Checksum: false
};

URL parameters:

  • siteUrl - Dataverse instance URL (required)
  • datasetPid - Dataset persistent ID (required)
  • key - API key (required)
  • dvLocale - Language code (optional, default: en)

@coveralls
Copy link

coveralls commented Dec 5, 2025

Coverage Status

coverage: 98.063% (+0.3%) from 97.795%
when pulling 97722e1 on feature/standalone-file-uploader
into 48dd9ff on develop.

… handling

- Add fallback to event.dataTransfer.files when webkitGetAsEntry() returns null
  (fixes Firefox drag-and-drop regression)
- Set webkitRelativePath on files obtained via FileSystemFileEntry for consistency
- Strip leading slash from entry.fullPath in both addFromDir and handleDroppedItems
- Add folder selection button with webkitdirectory input for cross-browser folder uploads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants