Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 8, 20205 yr I have created a custom field in database of type Upload (Allow multiple). I would like to display uploaded images in the Lightbox widget. In the description of Display custom field is stated: If using mulitple uploads, $value is an array of File Objects. However it seems to be an array of strings and not File Objects, as this code fails: Error: Call to a member function thumbnail() on string (0)
January 9, 20205 yr Try loading the file $image = \IPS\File::get( 'theStorageLocation', $value ); Then $image->url etc etc
January 9, 20205 yr Author 1 minute ago, TheJackal84 said: Try loading the file $image = \IPS\File::get( 'theStorageLocation', $value ); I've already done. This is just a kind of "bug" submission that docs in description is wrong. 😉
January 9, 20205 yr The upload field is behaving different within pages, please see ( just mentioning it here for the people which find this topic via the search ) I guess we could and should update the description 🙂
Archived
This topic is now archived and is closed to further replies.