-
Notifications
You must be signed in to change notification settings - Fork 39
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
How do i config image path URL ? #35
Comments
Hi! |
The reason I didn't set absolute URL to the output for the images is because the portability, and if you already access it through the API, then for sure you are aware with the domain, so you simply could put it. Anyway, as this seems to be asked more often, I can think of adding a URI property (which will be quite ease) with absolute address, the only think I am not sure if it's good or not is to add field for a static token or not. |
Wow fast response! How is the url constructed today? I’m thinking, if it’s possible, to use the configuration invironment variable PUBLIC_URL (or maybe some other unknown to me better variable) and then append the path to assets and image. |
Well, internally it uses the And for token it uses the current user's token, which is not good idea to be added to the output because of possible leakage. Anyway, it might be really good idea to add it to the final output as separate |
Okey haha, lucky guess from my side. just to be clear, when you say “add it to the final output as separate uri“ are you referring to adding the complete uri of the image, including the baseurl to a different key in the image meta-data structure? Because I’m thinking this: What if one of the editors is in a directus invironment, and the other editor is used in an angular project, wouldn’t it be better if the image url is always stored as the complete uri? but maybe I’m missing something here |
Yes, there are couple of cases where this is not the most suitable, for example:
So in such cases, it might be more reliable to use |
Ah yes. that is correct... didnt think of that |
Also editor.js requires full path:
|
Hello guys,
I want to config domain to image path URL
Image data save right now
/assets/c99aa974-6132-4a6a-8442-5c1e162454a8
Config save to this
https://domain.com/assets/c99aa974-6132-4a6a-8442-5c1e162454a8
Great extension, Thank you
The text was updated successfully, but these errors were encountered: