WinJS share target with write access to file

0

My application acts as a share target for any file. I have read access to the instances of Windows.Storage.StorageFile objects, through:

    if (shareOperation.data.contains(Windows.ApplicationModel.DataTransfer.StandardDataFormats.storageItems)) {
        shareOperation.data.getStorageItemsAsync().then(function (storageItems) {
            for (var i = 0; i < storageItems.size; i++) {
                var storageFile = storageItems.getAt(i);
                // storageFile is of type Windows.Storage.StorageFile
            }
        });
    }

But when I want to write the file, I get an exception (0x80071779) that the file is read-only.

Is there any way to gain write access (including delete permission) to a file that has been received through the share contract?

I searched the net, but was not able to find any answer or even example that included write.

windows-8
windows-runtime
winjs
asked on Stack Overflow Apr 27, 2013 by Udo Klimaschewski • edited Apr 27, 2013 by Udo Klimaschewski

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0