Skip to content

Commit

Permalink
Merge pull request #6 from codesoap/upload
Browse files Browse the repository at this point in the history
Allow uploading without existing files
  • Loading branch information
sgreben authored May 16, 2021
2 parents 4cee60b + b47c24f commit ad9c46b
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 ad9c46b

Please sign in to comment.