﻿@model IFS.Web.Core.Upload.UploadedFile
@{
    ViewBag.Title = $"Upload complete: {Model.Metadata.OriginalFileName}";
}

<h2>@ViewBag.Title</h2>

<div class="alert alert-success">
    The upload of your file has completed: <code>@Model.Metadata.OriginalFileName</code>.
</div>

@{
    string downloadLink = this.Url.RouteUrl("DownloadFile", new {id = Model.Id}, this.Context.Request.Scheme);
}

<p>
    Download link to share: <input type="text" value="@downloadLink" class="form-control" readonly="readonly"/>
</p>

<p>
    Test link: <a href="@downloadLink">@downloadLink</a>
</p>

<p>
    <a asp-action="Index" class="btn btn-primary">Upload another file</a>
</p>
﻿@using System.Text.Encodings.Web
@model IFS.Web.Core.Upload.UploadedFile
@{
    ViewBag.Title = $"Upload complete: {Model.Metadata.OriginalFileName}";
}

<h2>@ViewBag.Title</h2>

<div class="alert alert-success">
    The upload of your file has completed: <code>@Model.Metadata.OriginalFileName</code>.
</div>

@{
    string downloadLink = this.Url.RouteUrl("DownloadFile", new {id = Model.Id}, this.Context.Request.Scheme);
}

<p>
    Download link to share: <input type="text" value="@downloadLink" class="form-control" readonly="readonly"/>
</p>

<p>
    Test link: <a href="@downloadLink">@downloadLink</a>
</p>

<p>
    <a asp-action="Index" class="btn btn-primary">Upload another file</a>
</p>

@section scripts {
    <script>
        (function() {
            // Replace URL for easy copying
            if ('replaceState' in history) {
                history.replaceState({}, null, '@JavaScriptEncoder.Default.Encode(downloadLink)');
            }
        })();
    </script>
}
Replace URL in address bar for easy copying
Replace URL in address bar for easy copying
