Upload a file!

Permalink
Can anybody suggest ?
I have a form how can I implement so user can upload an image that will be stored in File manager(I dodn't need so he/she have access to it just upload it

sergio11ofpp
 
Blenderite replied on at Permalink Reply
Blenderite
You can add a Upload File option to the form. It is the 6th one down in the Answer Type drop down.
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
I have Custom form (That creates a page with some attributes)
Blenderite replied on at Permalink Reply
Blenderite
Here is a really good addon for this purpose:
http://www.concrete5.org/marketplace/addons/front-end-file-uploader...

That is a good choice. It can be placed anywhere and is very configurable.
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
Thx But I will try to figure it.
Blenderite replied on at Permalink Reply
Blenderite
The part that complicated it here is the custom form. If it wasn't for that, it would be a piece of cake.
sergio11ofpp replied on at Permalink Reply
sergio11ofpp
Yeah more over I am using Ajax+Php
I ma passing the variables that has been inputed in a form to PHP
And PHP Creates a new page with some attributes(Tha already exist just different option)
Also each page that user creates has an image attribute.
So he have to upload it and after i will asign it I found This
<?php
    Loader::library("file/importer");
    $fi = new FileImporter();
    $newFile = $fi->import($pathToFile, $nameOfFile, $fileObject);
  }
?>
Blenderite replied on at Permalink Reply
Blenderite
You may be interested in taking a look into the guts of how the File Upload works in the default form. You can find the files for that here: \root\concrete\blocks\form