File upload problem in CMS Page upload

Hi,
I'm new in Fuel CMS and just setup v1.4 and start using the CMS function.
I create a page and after that want to upload an view file to that page, but when I upload a php file, it returns "The filetype you are attempting to upload is not allowed", and if upload html file then it returns "Please make sure the server is setup to upload files of this size and folders are writable". The file I uploaded is only 14K and I didn't change the default max upload file size settings. Also I checked the server permission, all paths inside fuel is 777 so it seems not a permission issue. Anyone have this kind of problem before ? thanks !

Comments

  • edited 7:27AM
    PHP and HTML files are prevented from being uploaded by your Apache configuration (this is a good thing).

    From reading your post, it seems you've completely misunderstood how Fuel works. Can I suggest you spend a bit more time reading the documentation - especially around the area of "controllers" and "views". Also read up on "uploading" and "assets" and you'll see how there's a disconnect between how Fuel works and what you're trying to do.
  • edited 7:27AM
    Thanks for comment.

    Maybe I didn't specify clearly in my last question, actually I'm trying the CMS page which manage inside the CMS Admin, and at the Pages section, there is a "Upload" button on toolbar which lead to a page. In there, admin and "Select a view file and upload to a page ...", I'd the problem at that point and don't know what view file I should upload...
  • edited 7:27AM
    FUEL allows you to statically create your website (like you would with a plain CI installation) and then at a later time after you've figured out the CMS side of things, upload those view files which will try it's best to import the variables and translate the PHP code into the templating code. So if you have a page in the CMS with a location of "about", and you had a fuel/application/views/about.php, you could upload that file.
  • edited 7:27AM
    Thanks, it exactly what I understand. When create the cms page, if already have a view file then will prompt to let me import those variables and also translate the PHP code into the templating code (which according to the layout settings). The problem is when I need to upload the view file (in your example about.php), it response "The filetype you are attempting to upload is not allowed" after submit, and will response "Please make sure the server is setup to upload files of this size and folders are writable" if I upload a html file (instead of php), is it any special settings I need to config ? (e.g. inside apache or php configuration)
    (p.s. I tried to upload in assets section, it is all normal)
  • edited 7:27AM
    Try add the mime of ''text/plain" to the fuel/application/config/mimes php mime type array.
  • edited 7:27AM
    It works, Thank you very much !!
Sign In or Register to comment.