helhum / upload_example

File Upload using Extbase and FAL
101 stars 49 forks source link

[TASK] Adds an example how to add attributes. #1

Open pfinkbeiner opened 10 years ago

pfinkbeiner commented 10 years ago

With that commit comes the ability to add a specific title and description to an image directly while uploading them.

There is even more possible like adding links or alternative text or any other already existing field in sys_file_reference table. Even extending the sys_file_reference reference is possible and fill it up with custom data. Just extend the FileReference model in your extension, assign your content via the model setter in UploadedFileReferenceConverter and thats it. Happy uploading.

pfinkbeiner commented 10 years ago

Well, I removed that obsolete mysql_real… and htmlspecial… stuff. I also wrote a fallback if the given values are empty it will act a more natural way and NULL will be stored in the DB. In TYPO3 backend you'll see the checkboxes only checked if it contains valid content.

Maybe the PersistentObjectConverter is the right way to store that additional attributes in more »extbase way«, but for know it should do the trick. I would really appreciate it to see such a solution implemented in the extension_kickstarter!

screen shot 2014-07-17 at 20 44 33