Giter Site home page Giter Site logo

starwars-silhouette's People

Contributors

prolice avatar

Watchers

 avatar

starwars-silhouette's Issues

[FEATURE] Allow configuring FilePicker `source` for Image Folders

Is your feature request related to a problem? Please describe.
The "data" source is hardcoded when reading the content of Image Folders.

image

This makes it difficult to import image folders when your preferred store is in another FilePicker sources, like "s3" or "forgevtt".

Describe the solution you'd like
I'd like to request an additional dropdown field in the module's configuration, to allow you to select between "data", "s3", and "forgevtt", so that the module can then use that source when doing FilePicker operations like the browse or upload.

image

Describe alternatives you've considered
A text input for a source argument could also work, though the average user may find it more difficult to use. If it is possible to list the sources the FilePicker is configured with, that would be helpful for populating a dropdown.

Additional context
I'm a mod on the Forge Discord and Forge users have an Assets Library which behaves similarly to S3 and uses the "forgevtt" FilePicker source. Users of this module on The Forge may run into issues since file uploads will go to the Assets Library, but the module always looks for the upload in the "data" source.

Other possible alternatives
Forge redirects browse requests to the "forgevtt" source when the browsed path doesn't exist in "data", but this module includes the default upload directory with the zip file, though they only seem to contain a PURPOSE file.

If these directories are not necessary and could instead be created dynamically at import time if they don't already exist (ie. do a browse first, then a create if necessary), then the redirect to the "forgevtt" source can happen successfully without other changes in the module.

Another possibility is to change the default upload paths for these images to use the Persistent Storage folder which Foundry allows modules to use for updates into the module's own user data, which was first included with https://foundryvtt.com/releases/11.292, which will not only mean that subsequent updates of this module for users won't need a re-import, but Forge can also handle the persistent storage folder's contents with special logic to circumvent the issue.

Persistent Storage. Packages may now declare "persistentStorage": true in manifest JSON files, which will treat any data stored within a "storage" subfolder in the package folder as protected. Any data stored in that folder will not be deleted when the package updates. It is important to note here: uninstalling a module with persistentStorage will still remove that persistent data. This mechanism exists solely to persist data through updates.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.