TACTIC Open Source
Tactic with Vue3 - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: Tactic with Vue3 (/showthread.php?tid=242)

Pages: 1 2


RE: Tactic with Vue3 - Tegwick - 10-05-2021

Hi Again,

I revisited my latest problem and it was kind of really dumb but I just did not understand how vue would act on img-src-attributes.

Here is the recap on trying to show an image that is provided from tactic as an asset:
- fail: <img src="localhost/assets/salespitch/blogpost/New Ideas_v001_web.jpg"/>
- success: <img src="https://localhost/assets/salespitch/blogpost/New Ideas_v001_web.jpg"/>

The first img will fail as vue prefixes path components, as for static resources provided by vue itself. Obviously that is not what I am trying to achieve.
The second is fine, as vue treats "http(s)://"-URIs as external resources. Smile

There is a lot more detail on stuff like this from the vue perspective, so I will add the links I stumbled upon here:
- https://stackoverflow.com/questions/37645243/static-image-src-in-vue-js-template
- https://stackoverflow.com/questions/50633001/vuejs-vue-router-linking-an-external-website
- https://github.com/vuejs/vue-router/issues/1280
- https://next.router.vuejs.org/guide/advanced/extending-router-link.html
- https://stackoverflow.com/questions/44595929/vue2-navigate-to-external-url-with-location-href

Hopefully I'll never need to understand all the stuff mentioned in these links. Smile

From here I will try to find answers for the following questions:
Q1) How do I grab the URI for accessing an asset using the API?
Q2) How can I reference to the most current version of an asset?

BR --t


RE: Tactic with Vue3 - listy - 10-05-2021

(10-05-2021, 09:31 PM)Tegwick Wrote: From here I will try to find answers for the following questions:
Q1) How do I grab the URI for accessing an asset using the API?
Q2) How can I reference to the most current version of an asset?
I pretty much sure every questions is answered in docs for the api.
Anyway getting the latest file would be: 
search_key = 'prod/asset?project=sample3d&code=chr001'
snapshot = server.get_snapshot(search_key, context='anim', [i]include_web_paths_dict=True, versionless=True)

[/i]
for the specific version:
snapshot = server.get_snapshot(search_key, context='anim', [i]include_web_paths_dict=True, version=2)[/i]


RE: Tactic with Vue3 - Tegwick - 10-06-2021

Cool pointers, will look into these... Thanks! Smile --t


RE: Tactic with Vue3 - listy - 10-25-2021

Any progress on this? How's it going?