summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xclient/partials/image/edit.html1
-rwxr-xr-xserver/core/Image.php7
2 files changed, 4 insertions, 4 deletions
diff --git a/client/partials/image/edit.html b/client/partials/image/edit.html
index 8af4400..3b37c3b 100755
--- a/client/partials/image/edit.html
+++ b/client/partials/image/edit.html
@@ -41,6 +41,7 @@
<input type="hidden" name="id" value="{{ data.id}}" />
<input type="hidden" name="file_name" value="cirros-0.3.4-x86_64-disk.img" />
+
<fieldset class="form-group">
<label class="control-label col-sm-2">Upload</label>
<input name="file" type="file"/>
diff --git a/server/core/Image.php b/server/core/Image.php
index ac967d5..f8cac04 100755
--- a/server/core/Image.php
+++ b/server/core/Image.php
@@ -388,7 +388,6 @@ class image implements Core{
*/
private function uploadImage(){
$id = $this->app->getPostParam("id");
- $file = $this->app->getPostParam("file");
$file_name = $_FILES['file']['name'];
$file_error = $_FILES['file']['error'];
$file_tmp = $_FILES['file']['tmp_name'];
@@ -406,10 +405,10 @@ class image implements Core{
return;
}
if( !is_uploaded_file($file_tmp) )
- {
- $this->app->setOutput("Error", "File Upload Error");
+ {
+ $this->app->setOutput("Error", "File Upload Error");
return;
- }
+ }
if(!isset($id)){
$this->app->setOutput("Error", "Incorrect id parameter");