upload with different link in db
upload with different link in db
GigilinE
Posts: 5Questions: 0Answers: 0
Hello, i used upload but when it put in db save link with server link, i want public link, how can do it?
This discussion has been closed.
Replies
i use this:
Field::inst( 'img_link' )
->setFormatter( Format::ifEmpty( null ) )
->upload(
Upload::inst( '/home/server/public_html/bot/new/image/SUPER/'.$time.'.'.'EXTN')
),
I don't quite understand the question I'm afraid. The instance you show there will be save the file to the file system, but no information about the file to the database.
This example shows how you can also save information to the database, including the web path.
More information about how the
Upload
class words, and how it can write information into the database is available here.Allan