Skip to content

Windows.Storage.Pickers.FileOpenPicker does not work in Wasm. #35

Closed

Description

@xsteel2003

As I said, I now migrate some of UWP's functionality to the browser, thanks to Uno's support for WebAssembly.
I need to open a local file in my browser. In UWP, the following code works fine:

`
Windows.Storage.Pickers.FileOpenPicker fileOpenPicker = new Windows.Storage.Pickers.FileOpenPicker();
fileOpenPicker.FileTypeFilter.Add(".jpg");

        var jpgFile =await fileOpenPicker.PickSingleFileAsync();

        if (jpgFile!=null)
        {
            tb_filename.Text = jpgFile.Name;
        }

`
But the above code does not work in Wasm. Does this alternative code work? Thank you!

Activity

  1. jeromelaban commented on Jun 13, 2018

    @jeromelaban
    Member

    Those apis have not been implemented in WASM yet, and those will probably need a bit of typescript in the Uno.UI.Wasm project to work properly.

  2. Ali-YousefiTelori commented on Jun 24, 2018

    @Ali-YousefiTelori

    how we can run typescript in c# code and how use browser file chooser?

  3. added
    kind/enhancement
    on Oct 2, 2018
  4. HaoLife commented on Nov 8, 2018

    @HaoLife

    @jeromelaban This method is not supported on iOS and Android, I tried to use Xam.Plugin.Media, but there was a problem after integrating prism, so I can't use the picture library right now.

  5. added
    platform/wasm 🌐
    on May 22, 2019
  6. added
    project/non-ui ⚙️
    on Sep 21, 2020
  7. self-assigned this
    on Oct 26, 2020
  8. added this to the 3.3 milestone on Nov 3, 2020
  9. removed this from the 3.3 milestone on Nov 11, 2020
  10. removed their assignment
    on Nov 11, 2020
  11. MartinZikmund commented on Feb 12, 2021

    @MartinZikmund
    Member

    Closing in favor of #4028

  12. added a commit that references this issue on Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementplatform/wasm 🌐project/non-ui ⚙️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions