Skip to content

Commit

Permalink
Allow uploading without existing files
Browse files Browse the repository at this point in the history
  • Loading branch information
codesoap committed May 15, 2021
1 parent 8c56318 commit b47c24f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,17 @@ const directoryListingTemplateText = `
</head>
<body>
<h1>{{ .Title }}</h1>
{{ if .Files }}
{{ if or .Files .AllowUpload }}
<table>
<thead>
<th></th>
<th colspan=2 class=number>Size (bytes)</th>
</thead>
<tbody>
{{- if .Files }}
<tr><td colspan=3><a href="{{ .TarGzURL }}">.tar.gz of all files</a></td></tr>
<tr><td colspan=3><a href="{{ .ZipURL }}">.zip of all files</a></td></tr>
{{- end }}
{{- range .Files }}
<tr>
{{ if (not .IsDir) }}
Expand Down

0 comments on commit b47c24f

Please sign in to comment.