Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files URL hardcoded in database interfere with ip or domain change #121

Closed
nico9julio opened this issue Dec 4, 2017 · 1 comment
Closed

Comments

@nico9julio
Copy link

  • flagrow/upload extension version: <0.5.7>
  • flarum version: 0.1.0-beta.7
  • Upload adapter causing issues: image url hardcoded with servername

Hello! Thanks for this great extension!
After changing server IP I have noted that no image was showing up.
So I looked in database table for uploaded files and saw that the complete URL is saved, for example: http://192.168.10.99/flarum/assets/files/2017-11-02/1509651602-0-rufusuefi.png

I think this could be better if only date and filename where saved. So the script assemble the complete URL with the server URL and the image directory variable, preconfigured by UI.

Thanks!

@luceos
Copy link
Contributor

luceos commented Dec 5, 2017

Sadly that is impossible because this extension allows for multiple upload adapters. In order to understand where the image has to be included from it stores the url when uploading. A good example of this is imgur, without saving the url there would be no way to know where the file was uploaded.

Instead you could easily replace all values in your database, see: #115 (comment)

@luceos luceos closed this as completed Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants