Using files from File Manager for content items

pawel.mlynarczyk
pawel.mlynarczyk Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

Hello everyone.
I have a question about using files loaded by File Manager.
I am creating a content item that will use a photo file. I want this photo to be able to be loaded via File Manager and then to be used.
By default, the loaded file is located in: data/DE/media/files
However, I cannot use it yet. Only after running the frontent:build:yves command, the file/photo is moved to public/Yves/assets/current/default
When I enter the URL address to this place, e.g. assets/current/default/images/file name, content item finds the file of photo and displays it.

My question is what if the user wants to do the same thing as me? after all, he won't run the frontend:build:yves command. Will the user be able to use File Manager and place files in Blocks or content items without this command?

Tagged:

Best Answer

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 81 🏛 - Council (mod)
    Answer ✓

    There isn't an out of the box module to upload images for the storefront. Usually you'd use images from CDN or something similar to S3 buckets.

    The file manager is just to attache downloadable files .

    Usually Zed and the public folder are in different locations/containers so even if you implement such feature, you wouldn't upload the content to the public folder directly

Answers

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 81 🏛 - Council (mod)

    Hi pawel,
    There is this question,

    where you also commented.
    The file manager allows you to upload files that then you can add to cms pages by using the file list content item or tree.
    It's not supposed to be used as static assets for your templates or to be used in the public folder.
    The frontend build script doesn't copy assets from data folder into public folder, that I know of.
    I took a look at th source code and also tested and images in data/DE aren't copied.
    Could you please explain how you did it?
    Thanks!

  • pawel.mlynarczyk
    pawel.mlynarczyk Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

    Hi, thanks for the answer
    I checked again and you're right, I was wrong. It's because of my many attempts at solving the problem that have already gotten me confused.
    If we are already talking, please explain to me how, as an Admin in the Backoffice, I can add new photos for products, e.g. for Categories, or new photos for banners? From what I saw, the File list content item is only used to place a possible photo as a download link.
    When I choose to create a new Block and want to load a photo of my choice, it is invisible on the front page

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 81 🏛 - Council (mod)
    Answer ✓

    There isn't an out of the box module to upload images for the storefront. Usually you'd use images from CDN or something similar to S3 buckets.

    The file manager is just to attache downloadable files .

    Usually Zed and the public folder are in different locations/containers so even if you implement such feature, you wouldn't upload the content to the public folder directly

  • pawel.mlynarczyk
    pawel.mlynarczyk Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

    I see. Now everything is clear. Thank you very much for your answer