How to edit/manipulate Upload::DB_WEB_PATH
How to edit/manipulate Upload::DB_WEB_PATH
Koen Verhoeven
Posts: 25Questions: 7Answers: 0
in Editor
I'm using the follow code to upload files. This works perfectly:
->upload( Upload::inst( $_SERVER['DOCUMENT_ROOT'].'/documenten/daktuinen/__ID__.__EXTN__' )
->db( 'deenk_files', 'file_id', array(
'filename' => Upload::DB_FILE_NAME,
'filesize' => Upload::DB_FILE_SIZE,
'web_path' => Upload::DB_WEB_PATH,
'system_path' => Upload::DB_SYSTEM_PATH
) )
The current result in the database is: /documenten/daktuinen/2.jpg
I would like to change this to: https://mywebsite.com/documenten/daktuinen/2.jpg
But whatever I try, I can't find out how to influence the value for DB_WEB_PATH. Who knows how to do this?
Thanks for your help!
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Why would you manipulate DB_WEB_PATH if all you want is to have a different entry in your database? You can do this for example:
Actually - I'd say just as the domain name prefix when you are outputting it on the client-side:
Allan
I'm really sorry for my half-year later reply. Both answers are perfect. I was looking in the wrong direction.