Теперь вы можете использовать Cache.delete ()
Пример:
let id = "your-cache-id";
// you can find the id by going to
// application>storage>cache storage
// (minus the page url at the end)
// in your chrome developer console
caches.open(id)
.then(cache => cache.keys()
.then(keys => {
for (let key of keys) {
cache.delete(key)
}
}));
Работает на Chrome 40+, Firefox 39+, Opera 27 + и Edge.
Расширение (.png или .jpg) отсутствовало не в GetRealPathFromURI()
, а в ImageHelpers.SaveFile()
. Поэтому я сохраняю имя файла в другой переменной из пути, используя Path.GetFileName()
, как показано ниже, и передаю полное имя файла при вызове ImageHelpers.SaveFile()
.
var fileName = Path.GetFileName(picturepath);