Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Cannot upload images


Go to End


14 Posts   9651 Views

Avatar
ezgranny420

Community Member, 4 Posts

5 March 2007 at 3:02pm

Edited: 30/03/2007 9:35am

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/

Avatar
Sam

Administrator, 690 Posts

5 March 2007 at 4:39pm

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

Avatar
Ingo

Forum Moderator, 801 Posts

5 March 2007 at 9:56pm

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.

Avatar
ezgranny420

Community Member, 4 Posts

6 March 2007 at 10:37am

Edited: 30/03/2007 9:34am

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.

Avatar
Ingo

Forum Moderator, 801 Posts

6 March 2007 at 10:19pm

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 :)

Avatar
ezgranny420

Community Member, 4 Posts

7 March 2007 at 4:30am


----------------------------------------------------------
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

Go to Top