This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

GreenImp
GreenImp

Hi,

I'm sure I'm being a bit dim here - lack of sleep - but I'm trying to build a very basic plugin, with a single controller/view in the backend, which allows a user to upload a file and then I need to read the file contents and process it.

The processing of files is easy peasy, but I'm having trouble with what should be simple; How do I create a controller index view, with a form that's not tied to a model? Using a field config file requires a modelClass attribute.

I'm sure it's something stupidly simple.

Cheers

Last updated

chris10207
chris10207

Another way to handle this could be to build a simple command line that would process the user file uploaded before in a specific folder . this is what im doing to perform and process all my data import.

GreenImp
GreenImp

Thanks for your reply.

That is an option that I hadn't thought of. However, I'm building the site for a client and need for them to be able to manually upload files via the CMS.

Ideally I would have an interface for them to use, as they don't have server access.

Last updated

chris10207
chris10207

will they have access to the OctoberCMS backend ? if so, they will be able to use the filemanager plugins, this is what im using for my client

Last updated

GreenImp
GreenImp

Yes, they have access to the OctoberCMS backend (Albeit limited).

Do you mean this plugin? http://octobercms.com/plugin/indikator-filemanager I'm not sure that does quite what I want. How are you utilising it? I'm literally just wanted a page with a single file upload; the user uploads a file and it does some server-side processing of the file (Reading the data and updating the DB), and then provides a success/error message to the user.

It's all quite simple stuff, I just can't see how to create a form in a backend controller that isn't tied to a model (Because I have no models).

dziurawy20983
dziurawy20983

Did you found the solution for this?

1-6 of 6

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.