GET from URL

##English below

Estamos intentando leer las texturas atraves de un archivo de texto (o podría ser un JSON) que se encuentre en un servidor, con la idea de tener que modificar solo ese archivo de texto y que automaticamente se actualicen las texturas en los modelos.

Con el GET de datos atraves del componente “SDTextFileInput” no tuvimos problema, logramos leer el archivo de texto perfectamente en grasshopper y ver como reacciona si modificabamos o agregabamos links al archivo que contenia las texturas. El problema se produce cuando subimos el archivo a SD, pues cuando modificamos el archivo de texto con las URL, estas no cambian en el modelo de SD.

Por lo que me di cuenta, el archivo de texto obtenido del servidor es descargado solo una vez al momento de subir el .gh a la plataforma y luego sin importar si el archivo cambia, siempre lee el archivo que descargo cuando se subio el modelo 3D.

La pregunta es, ¿Existe alguna manera de hacer que SD lea constastemente el archivo de texturas o aún no le dan soporte a esa opcion? o ¿Se te ocurre alguna manera de hacer que podamos tener 1 solo archivo de texto con el que controlemos todas las texturas de los modelos?

----------------------------------------------------------------- o ---------------------------------------------------------------------------

We are trying to read the textures throught a text file (or could be a JSON) that is located in the cloud, with the idea of modifying just one file in the cloud and automatically update the textures in all the grasshopper definitions that contains the link to this file.

We have no problem getting the information throught the “SDTextFileInput” component, we can read the text file in grasshopper and see how it works when we modified or added new textures link to the file. The problem is produced when we upload the grasshopper definition to SD because when we modify the text file with the URL’s this ones don’t produce changes in the SD Model.

What we assume is that the server get the file just one time when we upload the file to the platform and after, no matter if we change the file, SD always read the file that downloaded on the first time.

The question is, ¿Is there some way to make that SD read constantly the textures file or it doesn’t exist this option yet? or ¿Do you know some way to have just one text file with all textures that can be modify in the future and generate change in the SD models?

You are right in your assumption: the file that the url is pointing to is internalized and cached, so it won’t be updated on our servers as long as the URL stays the same. For performance and security reasons, there is no way to prevent our servers from caching the URL content at the moment.

However, since you are integrating the viewer in a web application, there is a workaround. You can generate aliases for the same URL every time the ShapeDiver model is accessed, for example by using query string parameters. The web application could generate a timestamp, or use a version for example, and use it in a query parameter: https:www.website.com?timestamp= 20190116T114200

That way, every time you open a ShapeDiver model, the servers would recompute the solution by using the latest content of the url.

Let me know if that solution works for you.