Is it a known bug that when you publish a page with an attached image (even with the relation listed in the $owns array) that the image still says "Draft" even though it has already been published with the page
but i know this has now been removed in SS4
There isn't a proper way to do it, since the filesystem could live anywhere
Why do you need the absolute path?
I'm going to scan the file with antivirus as it gets uploaded
are you saying i'll need to build the path myself by figuring out if its published or not
Yeah usually I'd use getString or getStream / save it to a tmp file to work with the contents of a file....
For your use case, can you see what
Director::getAbsFile() does? I seem to remember seeing it be mentioned before (n.b I haven't tried using it myself though)
Thanks I tried that, i dont think its giving me the full path including .protected etc
Saving to a temporary file from the stream is the best way
It also means that you could support remote files
Just curious cause I also have the same problem for a client, what antivirus were you using to scan uploaded files @_config.php?
symbiote wrote a SS3 module
im looking to upgrade it
to work with SS4
sort of trying to get a feel for how long its gonna take so i can quote a client
I had a pen test done on the silverstripe site i built for a client and this was one of the issues
is it easy to copy a file to a tmp file path?
File class has methods of
ah yeah getstream!
Looking through the module code, I can't see anything really obvious that would cause big problems moving to CMS 4
It even has mechanisms for files which are external to the filesystem
yeah this file thing might be the only real blocker
in SS3 it used to be
does anyone know how i can get a file's absolute path in Silverstripe 4
I have a question about the CSRF token for doing graphql mutations. In regular silverstripe forms the token is added as a hidden field. Where can I get the token to use for the graphql mutation?
@_config.php has joined the channel