Beispiel #1
0
        private static void SaveMeta(string token, UploadMetaData meta)
        {
            var filepath = HostingEnvironment.MapPath("~/tokens/" + token + ".json");

            Directory.CreateDirectory(Path.GetDirectoryName(filepath));
            File.WriteAllText(filepath, meta.ToString());
        }
        private async Task SaveMeta(string token, UploadMetaData meta)
        {
            var filepath = GetTokenPath(token);

            Directory.CreateDirectory(Path.GetDirectoryName(filepath));
            await System.IO.File.WriteAllTextAsync(filepath, meta.ToString());
        }