About the path of uploading pictures and videos

Bugs, needs and ideas
reply
UPDATE_007
Posts: one
Registration time: 07:33, July 28, 2022

About the path of uploading pictures and videos

Posts from UPDATE_007 »

After modifying the domain name. Attachments such as pictures are no longer displayed.
Please ask why it is a security problem or for what purpose not to save these materials in a relative path? Novice doesn't understand

also. I searched the Internet for a solution to this problem. Most of them modify the database

I tried it myself
But it hasn't been successful

$link_a='111.111.111.111';
$link_b='222.222.222.222';

$result = mysqli_query($conn,"UPDATE 'typecho_contents' SET 'text' = REPLACE('text','$link_a','$link_b')");

The code is as above. The database connection was successful. I tried many times, but I couldn't change it. Please master. Give me some advice. thank you.
Lopwon
Posts: one hundred and seventy-three
Registration time: 11:19, November 14, 2016

Re: About the path of uploading pictures and videos

Posts from Lopwon »

Update 'table name' set 'field name'=replace ('field name', 'old domain name', 'new domain name');
one billion fifty-six million three hundred and forty-nine thousand six hundred and forty-four
Posts: two
Registration time: 14:20, August 11, 2022

Re: About the path of uploading pictures and videos

Posts from one billion fifty-six million three hundred and forty-nine thousand six hundred and forty-four »

I also found this problem. This is because the attachment address has an IP address. I recently used the 80x86 image docker version and found no such problem
Kaikai 1995
Posts: nine
Registration time: 22:57, December 25, 2022

Re: About the path of uploading pictures and videos

Posts from Kaikai 1995 »

Just get the relative address
reply