Honestly, i dont understand meantioned analogy. I have filled again all resources, after delpoying and building classes and configuration on remote server. Other features works properly.


Hi all!

Have somebody faced problem with SortableUploadField (bummzack's) used on site with Postgresql database? I'm developing site locally with MySQL, and after deploying on test server where Postgres used, images not ouputed in templates in right order. On local site, everything works fine.

There is some ItemPage class

  1. private static $many_many = [
  2. ...
  3. 'Images' => Image::class,
  4. ...
  5. ];
  7. private static $many_many_extraFields = [
  8. 'Images' => ['SortOrder' => 'Int'],
  9. ...
  10. ];
  12. private static $owns = [
  13. 'Images'
  14. ];

cmsfield definition:

  1. $fields->addFieldToTab('Root.Images', SortableUploadField::create(
  2. 'Images', $this->fieldLabel('Товар')
  3. ));

and the method for output:

  1. public function SortedImages()
  2. {
  3. return $this->Images()->Sort('SortOrder');
  4. }

and template:

  1. <% loop $SortedImages %>
  2. <li class="item-slide" data-thumb="$File.getAbsoluteURL" data-src="$File.getAbsoluteURL">
  3. <img src="$File.getAbsoluteURL" alt="">
  4. </li>
  5. <% end_loop %>

Seems everything just like in tutorial at github, maybe i miss something?


Hm, i'm doing same output last time, but without setting encription type. Will try again, thanks!


Don't understand what means multipart encoding


Hi all! i'm creating frontend form on SS4.4. There is 3 Filefields, i need to send this files like email attachment. What is easiest way to make it?

I don't undestand how to make file instance from form data ( to use addAttachmentFromData()). And is it neccesary save file to file system? Or i can send file directly from form data?