-
☆ A M B ☆
- 26 Posts
Hi,
I need a file upload capability from a CMP page. I have seen the post that indicates to use xtype: 'file' and that presents fine in the UI and gives me exactly what I want. I can't seem to find any PHP code to go into the processor file to handle the file upload and store to the server.
Can any body provide a sample piece of php processor code or explain how to handle the xtype; 'file' processing.
Thanks
Tim
-
☆ A M B ☆
- 3,141 Posts
There is actually a file input, though from what I recall you need to use the textfield xtype, and specify inputType: 'file'. You'll also need (again, this is from memory) fileUpload: true in the form definition.
modx-combo-browser is real easy, but if all you need is a simple file upload it can be better to not use it.
The file inputType just sends files like regular forms, ie in a $_FILES global variable.