You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And in the database, the fof_upload_files table if you look at the url column, it is also reverencing the full path.
Is there a reason why you would use the absolute path when storing the file locally? I understand if using a CDN or a 3rd part toool you would need to have a full URL.
I feel like this would cause issues if i ever need to change my domain name or do testing on a dev server..
Thanks all!
The text was updated successfully, but these errors were encountered:
I believe the reason the full URL is stored for local files is indeed because of the cloud adapters. The local adapter is essentially treated like any other cloud adapter, and a URL is stored for compatibility with the other adapters.
The full URL being inserted in the post itself is likewise for compatibility reason. But I believe there was some work in progress to move to the UUID exclusively in the future, as it will allow the adapter to change the URL dynamically if the CDN prefix changes, or for local uploads if the forum host changes.
At the moment, if you change your forum URL you will need to perform a search and replace on the post content as well as the column that holds the URL on the files table. An easy "hack" to do this would be to perform the search and replace not on the live database, but on the SQL backup file while you move from one host to another, that way in one single operation you can replace everything that needs to be changed, including all third-party extensions and user-inserted links.
So I have noticed that when you upload a file to Flarum using your tool, if you look at the code for the post it will have something like this:
And in the database, the
fof_upload_files
table if you look at theurl
column, it is also reverencing the full path.Is there a reason why you would use the absolute path when storing the file locally? I understand if using a CDN or a 3rd part toool you would need to have a full URL.
I feel like this would cause issues if i ever need to change my domain name or do testing on a dev server..
Thanks all!
The text was updated successfully, but these errors were encountered: