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.

Archive /

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

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

Cannot upload images


Go to End
Reply


14 Posts   7392 Views

Avatar
Peter

Community Member, 4 Posts

14 February 2007 at 6:06pm

Windows installation. Tried to upload an images from the Files and Images area and get a popup saying:

'file.jpg' is too large (7KB). Files of this type cannot be larger than

[OK]

That's all. No indication of what the max file size is (is there a config file missing or something??)

Also, possibly related, I get a message when I rename a folder in the photos directory:
$('Form_EditForm').getPageFromServer($('Form_EditForm_ID').value); statusMessage("Deleted 0 files.");

Cheers,

Peter

Avatar
jojohio

Community Member, 5 Posts

20 February 2007 at 6:54am

Hi, same problem here. Just installed windows installer did tutorial1 and now want to add a pic...

Sorry, I can't help. Maybe someone else can?
jj

Avatar
Matt

Core Development Team, 84 Posts

20 February 2007 at 9:46am

We'll try and get these fixed in the next release. The reason that you're not getting an indication of the maximum file size is most likely a Windows installer bug, possibly related to the other ini_get errors (such as the PHP installer not being able to find the memory_limit directive on Windows).

I haven't been able to find a work around yet, but if I turn anything up before the next release, I'll post it here.

Avatar
jojohio

Community Member, 5 Posts

20 February 2007 at 10:21am

Edited: 20/02/2007 10:29am

respect to all the work you did creating this great tool! But what shall we do with the drunken sailor? i was just gettin happy with my first selfbuilt cms.
but without any pictures?

Avatar
Matt

Core Development Team, 84 Posts

20 February 2007 at 5:55pm

Hey Peter and jojohio,

I've found a workaround until we can get this corrected in the next release. Open up your mysite/_config.php file and insert the following text on a new line somewhere:

// Set .jpg files to a maximum uploaded filesize of 10 MB (1024x1024 = 1MB x 10 = 10MB)
File::setMaxFileSize(1024*1024*10, 1024*1024*10, 'jpg');

This will allow you to upload files up to 10 MB with the extension .jpg. For now, just call this multiple times, once for every kind of file you want to upload.

In the next release, we'll fix this so that the filesize is only limited by PHP, then we can use File::setMaxFileSize() for it's actual purpose.

Sorry for the problems!

Also, I noticed a problem when attempting to view a file in the Files & Images section after it's been uploaded, so I've fixed that. I've posted a new thread about that bug, so if you get a SQL error when you click on a file, check out the fix here:
http://www.silverstripe.com/bugs/flat/370?showPost=370

Avatar
Peter

Community Member, 4 Posts

22 February 2007 at 6:04pm

Thanks Matt, that fixed it (also applied the fix in the other thread you mention). All seems to be running smoothly now.

Avatar
Edgars

Community Member, 2 Posts

25 February 2007 at 10:25am

The same bug is also relevant to Ubuntu, not only Windows

Avatar
ezgranny420

Community Member, 4 Posts

4 March 2007 at 7:07pm

Edited: 05/03/2007 2:50pm

Hi Matt, thanks for the tip and I'm glad to see it helped Peter. I did not stop my installation from having these errors though. It still can't upload images to assets or rename folders. I believe my ISP is running Ubuntu. I used the PHP installer. Any other tips would be much appreciated!

P.S. I'm also receiving the dhtml tooltip error in the lower right corner saying 'nothing to upload'. This happens in both ie7 and firefox 2.

P.S. When I kill the script in AssetAdmin.php and print_r($_FILES) it shows an error 4 meaning "No file was uploaded". Also there is no tmp_file listed.

Go to Top