-
Notifications
You must be signed in to change notification settings - Fork 9
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
Private file system #66
Comments
Yes this works for this plugin, but there might be different credentials needed, while the storage should NOT be accessible through http access. You can take a look at the file |
Thanks for your answer. For now, I tried the same credentials and added the config to I cleared the cache, but it doesn't work. The files are uploaded to the local filesystem. Is it mandatory to create a separate file? Should this file in YAML format as in the docs or follow your format with This is my config: shopware:
filesystem:
private:
visibility: "private"
type: "bunnycdn"
url: "..."
config:
endpoint: "https://storage.bunnycdn.com"
storageName: "..."
subfolder: ""
apiKey: "..."
useGarbage: true
neverDelete: false |
ahhh, I'm sorry. in var/bunnycdn_config.yml the private is also declared, isn't it? help: copy the entire file of var/bunnycdn_config.yml to your new file and adjust the setting. I'll create a todo from this issue 😍 Thank you for bringing this up again. |
Thank you! There is no When I try to clear the cache, following error occurs: This is the config: shopware:
cdn: { url: "..." }
filesystem:
{
public:
{
type: bunnycdn,
url: "...",
config:
{
endpoint: "https://storage.bunnycdn.com",
storageName: ...,
subfolder: "",
apiKey: ...,
useGarbage: true,
neverDelete: false,
},
},
private:
{
visibility: private,
type: bunnycdn,
url: "...",
config:
{
endpoint: "https://storage.bunnycdn.com",
storageName: ...,
subfolder: "",
apiKey: ...,
useGarbage: true,
neverDelete: false,
},
},
sitemap:
{
type: bunnycdn,
url: "...",
config:
{
endpoint: "https://storage.bunnycdn.com",
storageName: ...,
subfolder: "",
apiKey: ...,
useGarbage: true,
neverDelete: false,
},
},
theme:
{
type: local,
url: "",
config: { root: "%kernel.project_dir%/public" },
},
asset:
{
type: local,
url: "",
config: { root: "%kernel.project_dir%/public" },
},
} |
as the message says: remove url from private filesystem. Hmmm, while there was no private filesystem in the bunnycdn_config your setting as before should work 🙈 |
Sorry that I didn't mention it: I tried that already and it did not work. The error disappears, but the files are uploaded to the local filesystem and no activity in Bunny. |
hmmmm, you cleared the cache? and the var/cache/*? while it is loading the file (regarding the previous error message) it "should" work while it shopwares defaul behaviour. When you intend the line, the {} are not neccessary. |
Yes, the cache was cleared and The files are uploaded with this extension: https://store.shopware.com/neon558587413963m/datei-upload-fuer-produkte-produkt-konfigurator-add-on.html They use the |
are you able to verify the code, that they really use filesystem.private and not hardcoded local paths? |
The parent extension of this addon has some <service id="Neon\Configurator\Controller\Storefront\NeonconfiguratorFileController" public="true">
<argument type="service" id="shopware.filesystem.private"/>
...
</service> This are the interesting parts of const FILE_FOLDER_CONFIGURATOR = 'neon-configurator/'; // in another file
class NeonconfiguratorFileController extends StorefrontController
...
$path = Neon6Configurator::FILE_FOLDER_CONFIGURATOR."uploads/tmp/";
...
$this->fileSystem->has($path.$fileName) They use I asked them about that issue and they told me that they use the private file system. Hope these code snippets are useful, I don't want to post too much (because paid extension). |
That is totally okay regarding the plugin. That parts you posted look totally correct. It might be helpful to provide me with HTTP and ssh access to a test-shop where you can reproduce it. So I can check it on site over the weekend. If it's okay for, you can contact me 1on1 at Slack. You find me as |
Thank you @tinect, you have a Slack message. |
@carstenjaksch As mentioned in 1on1 chat, this is no issue with this plugin, but the one of neon6configurator. you can create a dedicated yaml file as mentioned above. the storage should not be linked to any pull zone!
|
Please describe the feature you would like to see implemented.
Today I learned about the private file system and that our product configurator (image uploads for product customization) uses that to store files.
Unfortunately, we need customer files on a CDN, because they are large in numbers and consume a ton of storage. Our live server storage is limited and upgrades are expensive as hell.
I found this issue: #30
Is there really no way a private file system adapter could work with this extension?
The text was updated successfully, but these errors were encountered: