Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
2  data/templates/edit-file.htm
@@ -2,7 +2,7 @@
<div class="row-fluid">
<div class="span6">
<input type="hidden" name="files[{{fileid}}][original_name]" value="{{file.getFilename}}"/>
- <input type="text" name="files[{{fileid}}][name]" id="filename_{{fileid}}" value="{{file.getFilename}}" placeholder="Filename"/>
+ <input type="text" name="files[{{fileid}}][name]" id="filename_{{fileid}}" value="{{file.getFilename}}" placeholder="Filename (optional)"/>
</div>
<div class="span6 typeselect" style="text-align: right" id="typeselect_{{fileid}}">
<label for="type_{{fileid}}" class="inline">Type</label>
View
4 src/phorkie/Repository/Post.php
@@ -48,6 +48,10 @@ public function process($postData)
if (!isset($orignalName) || $orignalName == '') {
//new file
$bNew = true;
+ if (strpos($name, '.') === false) {
+ //automatically append file extension if none is there
+ $name .= '.' . $arFile['type'];
+ }
} else if (!$this->repo->hasFile($orignalName)) {
//unknown file
//FIXME: Show error message

No commit comments for this range

Something went wrong with that request. Please try again.