I let users upload images via safecracker.
The process is very standard:
- User submit form (fields: name, email, selected file from users HD)
- Safecracker uploads the file into the appropriate directory
- Safecracker adds an entry to the submit channel in the database
- The users gets redirected to the submit/thanks page
- I get a mail announcing the upload
My problem: This only works for files with a certain size. I can confirm, that it is fine for files with the size 840kb and that files with more than 2577kb will not work. Somewhere in between will be the breakpoint, which I haven´t figured out yet.
For the big files EE will just do point 2. The file upload will be fine, but the redirect won´t work. The submit-page will turn blank, as if the browser attempts to redirect, but can´t get the thanks-page to load. 3 and 5 aren´t executed.
I think, I found the error
Fatal error: Out of memory (allocated 49020928) (tried to allocate 4000 bytes) in www/frogcroc.com/www/system/codeigniter/system/libraries/Image_lib.php on line 1246
I assume, that I get this error, because my memory limit on the server is exhausted (shared hosting). I assume, that EE tries to make one of those "internal" thumbnails that are needed for watching the entry in the CP.
I need to know: Are my assumptions right? If yes, what are my options?
I can ask my provider to give me more memory. Question: For how much should I ask, and what kind of memory is it, the PHP image memory? What are the technical terms to describe what I want?
Preferred method: Let the users upload all images, how big they might be, but avoid the memory issue, by not invoking the thumbnail routine. I don´t need to see the picture in the CP entry. I´m fine to just get the file name. Preferrably as part of the mail. How can I change the file-fieldtype in the channel "submit", that shows the thumbnal into a text field, that just shows me the filename?