Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dialog][v2] - File size always 0 #1296

Closed
luis-cicada opened this issue May 7, 2024 · 0 comments
Closed

[dialog][v2] - File size always 0 #1296

luis-cicada opened this issue May 7, 2024 · 0 comments

Comments

@luis-cicada
Copy link
Contributor

luis-cicada commented May 7, 2024

Problem:

When using the dialog plugin in Tauri applications to select a file, the reported size of the selected file is always 0.

Description:

Currently, when using the dialog plugin's file picker functionality to select a file within a Tauri application, the returned file size is consistently reported as 0 bytes, regardless of the actual size of the file selected by the user. This issue affects applications that rely on accurate file size information for processing or displaying selected files.

Expected Behavior:

The dialog plugin should accurately report the size of selected files, providing the correct file size in bytes to the Tauri application.

Steps to Reproduce:

  • Create a Tauri application.
  • Use the dialog plugin to implement a file picker dialog.
  • Select a file using the file picker dialog.
  • Retrieve and log the size of the selected file.
  • Notice that the reported size is always 0 bytes.

Environment:

Operating System: macOS/Windows 11
Tauri Version: v2.0.0-beta.11
Plugin Version: v2.0.0-beta.3

Additional Information:

This issue significantly impacts applications that rely on accurate file size information for their functionality. It affects usability and may lead to incorrect behavior or unexpected results in applications where file size is an essential factor.

Fix Proposal:
The issue seems to stem from how the dialog plugin handles file selection and retrieval of file metadata. A potential fix would involve updating the plugin to correctly fetch and provide file size information to the Tauri application when selecting files.

Linked Pull Request:
This issue is addressed by PR #1295, which proposes a fix to accurately report file size when using the dialog plugin.

@luis-cicada luis-cicada changed the title Dialog file size always 0 [dialog] File size always 0 May 7, 2024
@luis-cicada luis-cicada changed the title [dialog] File size always 0 [dialog] - File size always 0 May 7, 2024
@luis-cicada luis-cicada changed the title [dialog] - File size always 0 [dialog][v2] - File size always 0 May 7, 2024
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

No branches or pull requests

1 participant