Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Is it possible to save file in web root with blueprint field: file type?

Started by Muut Archive 10 years ago · 4 replies · 487 views
10 years ago

I'm trying to save file in the grav root , in fact I want the user upload his favicon, need to be in the root of the website
Thanks for help


el_favicon_upload:
label: ''
type: file
size: long
help: ''
destination: '/'
showuploaded: true
showuploadedpreview: true
multiple: true
accept:

  • image/*

10 years ago

I tried and you can't currently do it. Use a subfolder, I recommend a subfolder or user/, to adhere to the "standard" of having a Grav site self-contained under the user/ folder.

10 years ago

yes thats not a problem with a subfolder and this is my approach with all other cases, my case was only to upload favicon in the root because it's recommended, and my user have no access to ftp. but i understand your approach, thanks a lot for your time and the test you made

excerpt from : https://realfavicongenerator.net

Why do you recommend to put all files at the root of the web site?
When generating a favicon with RealFaviconGenerator, the instructions ask you to place all >files at the root of your web site. You may want to place them in a sub-directory, for >example in http://mywebsite.com/icons/, just to make things clearer. However, there are >three drawbacks with this approach:

Internet Explorer looks for favicon.ico at the root of the web site. Granted: this is because >we ask you to not declare favicon.ico.
iOS devices look for files such as apple-touch-icon-144x144.png at the root of the web site, >as described by Apple. This issue can be mitigated by declaring the icons in the HTML code >(this is necessary for Android anyway), but following Apple conventions is probably the best >move.
By default, Internet Explorer 11 looks for browserconfig.xml at the root of the web site.
Several services, such as Yandex, look for favicon.ico in the root directory.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1357 9 years ago
Archive · by Muut Archive, 9 years ago
2 936 9 years ago
Archive · by Muut Archive, 9 years ago
2 4066 9 years ago
Archive · by Muut Archive, 9 years ago
1 2954 9 years ago
Archive · by Muut Archive, 9 years ago
3 1120 9 years ago