Can any one suggest me the best way to write code for uploading a file in CakePHP?
- I need to upload a file and save its name in table.
- If the record saving fails it should not upload the file.
- If the uploading fails then the record should be rollbacked.
- The code should be reusable
- I need to upload the file in
afterSave
callback
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…