Notifications
Clear all

[Closed] Change absolute path of attachments

4 Posts
2 Users
1 Likes
476 Views
Posts: 2
Topic starter
(@istvan-szerletics)
New Member
Joined: 3 years ago

Hi,

I have a problem, so the attachments are stored in „wp_posts" table "guid" column with absolute path, like for example: "/var/www/html/wp-content/uploads/wpforo/default_attachments/img.jpg", but I need there a link, like this: "https://domain.com/wp-content/uploads/wpforo/default_attachments/img.jpg".

Is there any way to change it via the admin interface? Or is there a hook/filter with which I can manipulate/change the path?

Thanks in advance!

Many greetings,
Istvan

3 Replies
Sofy
Posts: 4309
 Sofy
Admin
(@sofy)
Support Team
Joined: 6 years ago

@istvan-szerletics,

We're really sorry, but there is no easy way I can help you with. This requires large changes in the plugin codes. 

I may suggest you check out the wpForo Advanced Attachments addon. It has the "Secure Attachment URLs" option. It keeps files path private. 

2 Replies
(@istvan-szerletics)
Joined: 3 years ago

New Member
Posts: 2

@sofy Hi,

Thank you for your answer.

What exactly do you mean that "Secure Attachment URLs" leaves for the files private path?

Can you please send an example?

Many greetings,
Istvan

Sofy
 Sofy
Admin
(@sofy)
Joined: 6 years ago

Support Team
Posts: 4309

@istvan-szerletics,

Can you please send an example?

It changes the following path: 

https://your-domain/wp-content/uploads/wpforo/attachments/1/thumbnail/4-cropped-cropped-wpforo-logo. png  

to this one: 

https://your-domain/community/forofile/thumb/3b179f96db5f4d80356718b0aab392e1/