Ravi Shankar
Ravi Shankar

Reputation: 1559

file upload not working front end in october CMS

When I am adding {% component 'fileUploader' %} on front end it not working, as I can see in page view source of that page it seems related js and css file is not being added while it showing in admin and working fine in admin section. Is there any other process add upload files from front end? I fallowed https://octobercms.com/plugin/responsiv-uploader this url instruction but it doesn't working.

Upvotes: 0

Views: 977

Answers (2)

Ametad
Ametad

Reputation: 402

The file Uploader plugin is a 'developer tool' as stated by the author. It must be specifically configured to make use of a (already existing) model relationship with System\Models\File.

How to make this relationship is described here in the OC docs: http://octobercms.com/docs/database/attachments

Example of a single file attachment:

public $attachOne = [
    'avatar' => 'System\Models\File'
];

Upvotes: 0

dragontree
dragontree

Reputation: 1799

You also have to initialize the componet before you use it. You can do this by dragging the component to the page or layout in the backend.

Or you can add the code to the top of the page or layout source. In you case it might look something like this: [fileUploader]

More info in the docs

Upvotes: 1

Related Questions