Summary

Wow! This chapter was vast, but we gave the users a new functionality to use on our social network. As people say, a picture is worth a thousand words—now they can upload pictures!

In this chapter, we covered how to detect a request type based on the contents of the request. We also refactored the way we were inserting the data in the database and the way we were retrieving it. We saw how to handle file uploads from the client and the API, and how to deal with filename collisions. We also covered how to validate file uploads, check the file type, and the size. Finally, we saw how to provide feedback to the user using flash messages and using the FlashMessenger view helper.

In the next chapter, we will allow our users to post URLs on their walls. Thanks to that, we will see how to deal with requests to external sites and how to process HTML using the ZendDom components.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.180.244