fl4p / WP-Filebase

WP-Filebase
http://wpfilebase.com/
34 stars 36 forks source link

Intranet vs Extranet download links #29

Open Gman1988 opened 8 years ago

Gman1988 commented 8 years ago

Hi i have problem when i use plugin in my site i have no problem with downloanding files from intranet (local) website. But from extranet(from internet) there is problem and link is wrong.

For example my website name local is "http://abcd" and link localy generated is "http://abcd/downloads/file"

When i set the website access from outside the domain in my company the addres is "http://abcd.domain.com" and website is working normally but File Base links are wrong they are still "http://abcd/downloads/file" but they should be "http://abcd.domainc.com/download/file" and when i change it in my webbrowser the file download ok but i cannot manage it to work automatic.

I saw setting in FileBase settings but i can only change if from abcd to abcd.domain.com and when i do this, website work ok on extranet but not working locally.

Does anybody have some clue?

fl4p commented 8 years ago

You would have to specify 2 URLs, which you cant. You might want to think about your intranet setup. Its somewhat weird that you need two URIs for a single resource, they should equal.

Gman1988 commented 8 years ago

I read about this and in plugin structure it should be sort of code which check dynamically the current accessed wordpress address, and here it not working or it there is just miss of this function.

I checked other plugins an they working ok witch links from internal and external access but they miss alot of your plugin functionality.

I dont have 2 different URLs it always the same, but when you access from extranet the domain part is always added and its normal.

fl4p commented 8 years ago

what is your siteurl set to in WP settings?

Did you consider setting a host entry on your computer to route the intranet request to the public site?

Gman1988 commented 8 years ago

As i wrote before "http://abcd" and when you enter to the website from outside of domain you need enter the address is "http://abcd.domain.com" but plugin do not add the ".domain.com" to the address in created download link. When you enter it manually in address bar the file is downloaded properly.

Host entry is configured properly.

To be clear, i wrote this post to show that there is a problem, as i wrote earlier with other plugins there is no problem. So there is no problem with wordpress/server configuration. Everything else work properly only download links are created wrong.

I checked internet for possible solutions but everything route to link creation mechanism.

fl4p commented 8 years ago

There is no problem, but WP-Filebase handles remote URLs absolutely, no relative URLs. It servers the remote files using a HTTP redirect. And if URLs were relative, they could only be relative to your WordPress site URL which should not change with the subnet your are accessing.

If you want more control on remote hosted files, I'd recommend the use of Amazon S3 (requires Pro)