Skip to content
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

FilePicker - best practice for storing files (images) uploaded via SPFX? #1734

Open
stevesuk opened this issue Jan 10, 2024 · 1 comment
Open

Comments

@stevesuk
Copy link

Category

[ ] Enhancement

[ ] Bug

[X] Question

Version

Please specify what version of the library you are using: [3.16.0]

Question

I'm using the FilePicker control in an SPFX to prompt the user to select an image - which will appear in the SharePoint page as part of the same webpart.

One of the FilePicker options is for the user to upload a file - and this is what my question relates to. For a modern SharePoint page - is there a best practice way of saving an image in the correct place? It looks like the built in webparts store their images in a Site Assets/SitePages/.../ folder (but it seems there may need to be some associated management with the sub-folder, which is dependent on the page name, and may even change if the page is renamed?).

Just wondered if there was a library, package or API which deals with saving an uploaded image, filing it in the right place and returning the Url. Or, do I have to come up with my own code for this?

Any guidance would be appreciated! Thanks,.

@ghost
Copy link

ghost commented Jan 10, 2024

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants