Upload file in backend

rhellyer

New Member
I've implemented a file upload field and that seems to work OK. However I'd like to be able to save just the filename into the field ( not the full path) and also display the filename on the edit page, as a cue for the user (the upload files will typically be docs or PDFs)

Any tips you can provide would be welcome!

Thanks
 
Hi rhellyer,
how big is your knowledge with PHP etc? I am asking because what i did once, was to let php check if the element is a file.
Then i put that result in a new variable and used the PHP explode tag to seperate the path into an array.
I then took the last array value (what was only the filename) and that i also split to have the filename and the file extension.
From this new array i took the first so i could have only the first array value (the filename)

All of this was - as i remember - put inside the default_row.php of your template.
I am not sure at the moment, but you could also print out the array values as every element has several options with it.
For example: element, element_raw, element_ro etc.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top