On 9/22/20 10:42 PM, Mark Wieder via use-livecode wrote:
On 9/22/20 7:58 PM, J. Landman Gay via use-livecode wrote:

Is this just a temporary filename (not long-term storage)?

No, the stacks are uploaded to AWS and remain there, retrieved from the server on request. There are currently hundreds of them with more added frequently. That's why I'm looking for a solution that doesn't involve changing all the file names, because renaming and re-uploading all those files would be way too much work.

How do the files get retrieved? Is there a database or something similar that stores the filenames? You could still use UUID filenames from now on and not have to mess with the existing ones.

I may have misled you. When I said the files were permanent, I meant they stay on the server until they get changed, which is fairly regular. They aren't stored on the user's machine where tempfile would be, they are downloaded as needed and only kept in memory.

Basically, stacks are named based on a FileMaker database that spits out text files listing various properties and content that our app needs to know. Stacks are created by a tool I wrote that merges those text files with a stack template to populate the content. The stack name in the text file is not only used to create the file name but also appears in several other places within the stack (menus, popdown buttons, labels, etc.) The file name is created by munging the name string. I'm looking for a way to create non-unicode file names based on the string that comes out of the database.

There's more to it than that; the server runs a cron job hourly that indexes all its files and creates AWS secure URLs for each. The app downloads that lookup file on demand. When the user selects a name from a list, the selection is munged to match the server name and the download URL is obtained from the cron job's lookup file.

We don't have a field in the database for a file name. We set up the system this way so we could change names when needed, which happens whenever the content and distribution of the material changes. Stacks are updated and replaced, sometimes split into two stacks, sometimes combined, sometimes rebuilt from scratch. As long as the FM text files contain the right string, the app can create the server filename. But the file name needs to be readily identifiable so we can manage the replacements on the server easily. If file names were UUIDs, wouldn't we still need a way to match the user's selection to a UUID?

When we set this up, we didn't know we were going to go multi-lingual.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to