Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Cannot upload images

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 7294 Views
  • ezgranny420
    Avatar
    Community Member
    4 Posts

    Re: Cannot upload images Link to this post

    Ok kids, listen up. Since I'm crazy and all, I decided I can't wait till april to get this bug fixed for us Ubuntu users. I ripped out the SS file manager and replaced it with tesupload an ajax progress bar enabled file upload utility.

    I still have NOT figured out the ss api function to update the Files table and the tinymce image manager!! Please someone tell me how.

    edit... cms/templates/Includes/AssetTableField.ss and make it look like this
    --------------------
    </tbody>
    </table>
    <iframe src="tesupload/html/upload-async.php" border="0" name="file_manager" id="file_manager" width="400" height="250"></iframe>
    </div>
    --------------------

    then extract the following file to your base site directory (outside of the silverstripe-2.0 dir but still in your web root.

    http://www.shift8.net/tesupload_ssmod_granny.tar.gz

    ....next edit tesupload/html/upload-async.php and change <base href="http://www.shift8.net/"> to reflect your domain.

    Then edit tesupload/html/receive_helper.php to change the upload/save paths.

    --------------------

    Again any help getting the silver stripe Files table and the tinymce image manager to populate with the uploaded data would be very much appreciated!!!

    P.S. You will also need Prototype to use my modification of tesupload.

    http://tomas.epineer.se/tesupload/

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Cannot upload images Link to this post

    Call File::sync() after the upload, and that will synchronise the File database with the assets folder.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Cannot upload images Link to this post

    Hey, ezgranny: first userdriven SS-customizations - awesome!
    We actually found tesupload when refactoring the files&images sections a bit, but refrained from using it because it puts some additional requirements in silverstripe (perl).
    do you know swfupload? http://swfupload.mammon.se/ - looks really promising.

  • ezgranny420
    Avatar
    Community Member
    4 Posts

    Re: Cannot upload images Link to this post

    Thanks! I plan to contribute as much as I can. That flash upload swf is awesome thanks for pointing it out to me. My goal is to live in a flash free universe someday soon but I'll definitely add this to my toolbox.

    Could one of you please help me by telling me a few common reasons for the form page editor not functioning? Here is what happens when i click one of the new form field creator links.

    http://www.shift8.net/formpage_error.gif

    Sam: Since I'm doing the upload through an iframe with a src outside the cms path where would be a good spot to call File::sync() without to much overhead? Also could you please tell me how to get the thumbnails to be generated in tinymce after File::sync() is called?

    Thanks so much guys for your help.

  • Ingo
    Avatar
    Forum Moderator
    801 Posts

    Re: Cannot upload images Link to this post

    Hm, thats hard to tell from the screenshot.
    Please insert this line into <myproject>/_config.php:
    Director::set_environment_type("dev");

    You should get a more descriptive error-message then

  • ezgranny420
    Avatar
    Community Member
    4 Posts

    Re: Cannot upload images Link to this post

    ----------------------------------------------------------
    ERROR:Error 512: No form ({Session::get('CMSMain.currentPage')}) returned by CMSMain->EditForm At l90 in /var/www/html/sapphire/core/control/Controller.php user_error(No form ({Session::get('CMSMain.currentPage')}) returned by CMSMain->EditForm,512) user_error at line 90 of Controller.php Controller->run(Array) run at line 48 of Director.php Director->direct(/admin/) direct at line 90 of main.php

    7294 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.