Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

files upload but no thumbnails are generated

hbfhbf wiki guy? MVP
This discussion is related to the FileUpload addon.

when a user uploads a file the original file is placed in the uploads/fileupload/XXX directory and the thumbnails XXX directory is created, but no thumbnail is placed in the directory.

any help would be appreciated. thanks.

Best Answer

  • Found a nasty workaround bypassing the creation of the thumbnail and displayng directly the final image. I modified the file class.fileupload.plugin.php The function modified is: public function PostController_Upload_Create($Sender) Find the statement: $MediaResponse = array( 'Status' => 'success',...

    and replace

    'PreviewImageLocation' => Url($PreviewImageLocation),

    with

    'PreviewImageLocation' => Url(MediaModel::Url($Parsed['Name'])),

    And you're done. My final code looks like this:

    $MediaResponse = array( 'Status' => 'success', 'MediaID' => $MediaID, 'Filename' => $FileName, 'Filesize' => $FileSize, 'FormatFilesize' => Gdn_Format::Bytes($FileSize,1), 'ProgressKey' => $Sender->ApcKey ? $Sender->ApcKey : '', 'PreviewImageLocation' => /Url($PreviewImageLocation)/ Url(MediaModel::Url($Parsed['Name'])), 'FinalImageLocation' => Url(MediaModel::Url($Parsed['Name'])) );

    Hope to be helpful.

    numj

Answers

Sign In or Register to comment.