This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've edited the original to be able to upload a field called "photo". | |
I also opted for not including the full path in my database so there is a bit more seperation | |
between database and file location. | |
Since these images are extension specific I opted to place them in the media folder like this: | |
'/media/com_[[[component]]]/images/[[[views]]]/'. This way i can keep my uploads seperate. | |
I also use the default componentHelper::randomKey(48); to generate a random key i append to the | |
filename to prevent double filenames being uploaded. |