⚠ In case you've missed it we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Juampi Mayoral

Member Since 27 Jul 2012
Offline Last Active Jan 16 2013 01:59 PM
-----

Topics I've Started

url missing when i upload a file

16 October 2012 - 02:56 PM

Hi guys! I'm having a problem when I change the url file. The Post response it's ok when i save, but when i return to the list, the url file link it's broken.

This is my Post response when i upload the file:

{"success":true,"files":[{"name":"64c32-b7920-Personal_6250.pdf","size":21896,"type":"application\/pdf","url":"http:\/\/localhost\/controlate\/assets\/uploads\/files\/2012\/Octubre\/64c32-b7920-Personal_6250.pdf"}]}

In my computer was successfuly saved, but when i go to the list, the url file it's like this:

http://localhost/controlate//64c32-b7920-Personal_6250.pdf

and it should be like this:

http://localhost/controlate/assets/uploads/files/2012/Octubre/64c32-b7920-Personal_6250.pdf

How can I change this file link before saving the data?

Any help?ยก? thanks! :D

How can I change upload path according to the date?

13 September 2012 - 04:14 PM

Hi everybody! I wann change upload path with before_callback

I have this:

$crud->set_field_upload('pago_archivo_comprobante', 'assets/uploads/files');

$crud->callback_before_upload(array($this,'verificar_path_callback'));



function verificar_path_callback($files_to_upload,$field_info){
if(is_dir($field_info->upload_path)){
return true;
}
else{
$path = base_url().'assets/uploads/2012';
mkdir($path,0777);
return true;
}
}

How can i set the new path? Thanks...

Why hidden date input doesn't save nothing?

05 September 2012 - 04:11 PM

Hi there! I'm trying to save the row updated date and I've this in the code:


$now = date('d/m/Y h:m:s');

$crud->change_field_type('updated_at','hidden',$now);

In html I have this:

<input id="field-updated_at" type="hidden" name="updated_at" value="05/09/2012 01:09:09">

but when I send my data it doesn't save the date... any help???? thanks!

How to build a dependent dropdown

03 September 2012 - 01:53 PM

Hi there! I'm trying to make a a dependent dropdown between categories and subcategories... any help???? Thanks!