Skip to content

Instantly share code, notes, and snippets.

View TLWebdesign's full-sized avatar
🤓

Tom van der Laan TLWebdesign

🤓
View GitHub Profile
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.