Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Commit

Permalink
Diagnostic changes to asset download/upload scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Sep 30, 2015
1 parent 458a732 commit ac92ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions jsil.org/ci/download.aspx.cs
Expand Up @@ -19,6 +19,7 @@ public partial class DownloadPage : JSONPage {

if (!File.Exists(targetPath)) {
Response.Clear();
Response.AddHeader("TargetPath", targetPath);
Response.StatusCode = 404;
return;
}
Expand All @@ -27,6 +28,7 @@ public partial class DownloadPage : JSONPage {
Response.StatusCode = 200;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileName(targetPath) + "\"");
Response.AddHeader("TargetPath", targetPath);
Response.Buffer = false;
Response.Flush();

Expand Down
3 changes: 2 additions & 1 deletion jsil.org/ci/upload.aspx.cs
Expand Up @@ -18,7 +18,8 @@ public partial class UploadPage : JSONPage {
Response.StatusCode = 200;
WriteResponseJSON(new {
ok = true,
size = (new FileInfo(targetPath)).Length
size = (new FileInfo(targetPath)).Length,
targetPath = targetPath
});
}
}

0 comments on commit ac92ece

Please sign in to comment.