save file path in database
- Single Page
Posted 04 April 2016 - 21:45 PM
Posted 03 May 2016 - 15:54 PM
What mean file path? When u upload file and then save it - u save just filename like string in DB, Crud do this for u by default
Posted 11 May 2016 - 16:35 PM
for example in the field of BD appears
assets/uploads/files/imagenes/ejemplo.png
Tks
Posted 12 May 2016 - 05:48 AM
Hi rafanl22
What GC library dose is - it just saves the image name by default - not the image name with the path. There is a simple reason to the same - it picks up the image path based on the configuration ...
What you can do is create additional field for actual image path - add the field - keep it hidden.
add callback_after_insert / update ...
reset the value of the actual image path with the path set for upload and the file name (in the upload field)....
this way u will be able to get your actual image path available ... as required.
Posted 12 May 2016 - 18:48 PM
Ok thank you for your help