问题
I am wanting to upload a csv file, validate it, and then upload into an existing model. However, I am using ATK4.2.1 and finding that either the example code that have googled are either missing some steps or not relevant in version 4.2.1.
To this end, for my first step I have tried mixing and matching code in attempt to get a fileStore up and running with no working results thus far.
Is there a step by step tutorial/guide that anyone can point me to. The reference on the agiletoolkit.org site does not have any examples for the atk4-addons; that I can find. It seems that it is more involved than just adding an object to the page.
Grateful for any assistance.
回答1:
You can find some installation instructions here:
http://agiletoolkit.org/doc/filestore
- Import this SQL into your database atk4-addons/misc/docs/dbupdates/filestore-001.sql
- Create a new page,
page_fileadmin extends filestore/Page_FileAdmin
- Create directory 'upload' and make it writable.
- In your model instead of addField use
$this->add('filestore/File');
If you need images, use filestore/Image
instead.
Please join https://groups.google.com/forum/?fromgroups#!forum/agile-toolkit-devel for updates on new documentation.
来源:https://stackoverflow.com/questions/11755700/filestore-step-by-step-example-with-4-2-1