Welcome Guest, Not a member yet? Register   Sign In
Writable directory question
#3

(02-13-2017, 08:24 PM)kilishan Wrote: Correct. The writable folder is for caching, etc. You can use it for file uploads if you have a action somewhere that can read that file and send it on to the browser. Basically, the writable folder is to help solve the question of, "Which folders have to be writable in my entire application" instead of having 2 or 3 folders (log, cache) under the application folder that you have to remember to make writable.

Thank you for the rapid answer)

Maybe I'm not right, but in my example of /writable/minified - I think I use writable folder as it suppose to serve for.

My point here is that actions are created on the server side, without any user's interaction, almost like your cache example and for not saving files e.g. stylesheets and scripts publicly or maybe to add additional checks through Escaper etc. won't it be wise to send them thought some controller that will secure them and then output to view?

I think questions here are:
- Is there such necessity or need in such complicated solution and will this make website more secured for some code implementations from front? E.g. upload of file from user that will not be directly accessed but can be viewed from frontend as usual.
- I can check file's content and then get it with readfile or file_get_contents. Both of this functions return the content of file or it's bite's representation. Then how to connect frontend link and this representation. E.g.


Code:
<link rel='stylesheet' type='text/css' href='[domain]/writable/files/avatar.gif'>


In this case /writable is Controller, /files is Method for working with files and search them through entire directory.
Is it a good approach or stupid?

Thank you very much again.
Reply


Messages In This Thread
Writable directory question - by mally - 02-13-2017, 03:10 PM
RE: Writable directory question - by kilishan - 02-13-2017, 08:24 PM
RE: Writable directory question - by mally - 02-14-2017, 01:33 AM
RE: Writable directory question - by InsiteFX - 02-14-2017, 07:05 AM
RE: Writable directory question - by Diederik - 02-14-2017, 12:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB