locked
share charm, zip file, and file system RRS feed

  • Question

  • Hi,

    I have code that shares a zip file (source) with any destination app the user selects.  This works, for example, to attach the file to email.

    However, I don't understand why the share charm does not show some sort of Windows Explorer client so that the user can also save the file.  If I want to allow the user to save the file, say to MyDocuments, can the user do that through the share charm, or only through something like the file picker?

    Thanks,

    Nick

    Monday, November 25, 2013 8:29 PM

Answers

  • The share charm lists apps with share target contracts. You can write an app that does the file saving and act as a share target. I think there are already some apps that like this in the store.



    Visual C++ MVP

    • Marked as answer by nr4christ Wednesday, November 27, 2013 8:47 PM
    Monday, November 25, 2013 9:35 PM

All replies

  • The share charm lists apps with share target contracts. You can write an app that does the file saving and act as a share target. I think there are already some apps that like this in the store.



    Visual C++ MVP

    • Marked as answer by nr4christ Wednesday, November 27, 2013 8:47 PM
    Monday, November 25, 2013 9:35 PM
  • Thanks for your reply.

    That's what I suspected, but it seems odd there is not some sort of Windows Explorer by default.  I would have thought this could be a somewhat common scenario, unless the assumption is that no one uses the local storage anymore and everything is in the cloud.

    At any rate, my problem is that I can't find that app, so I am not sure if it is because (a) my code is wrong, or (b) I am not looking at the correct app.  My code works for email, so I am guessing the problem is b.

    I see Mail and SkyDrive by default.  I have tried several free apps, and I can't see any in there (the latest two "All My Storage" and "Rec-Tangle").

    Do you have any particular app in mind?

    Monday, November 25, 2013 10:33 PM
  • Microsoft does not necessarily provide a solution to a common usage scenario. E.g. no email client shipped with Windows 7. 

    This jscript code seems to implement both the share target and the save file picker contracts.



    Visual C++ MVP

    Tuesday, November 26, 2013 12:30 AM
  • Charms Bar sharing works with modern apps only and the RT environment doesn't have any app specific for browsing files. This, almost certain to me, is a policy decision for MS. And since there's no app for browsing files, there is no logical target for receiving shared files.

    Looking from other perspective, sharing of files is so common and necessity for apps, File Picker has been provided, so that even without the Sharing contract, the app can save a file.

    Wednesday, November 27, 2013 9:53 AM
  • Your code for the share charm is probably correct, as you can successfully use it!

    What you are looking for is the FileSavePicker class. There's also sample code on that article.

    cheers,

    ~theCake


    Life is unsure - always eat the dessert first!


    Wednesday, November 27, 2013 10:42 AM