Dear,
I created a CCK image field, But when try to upload it gives error "The file could not be uploaded." How can i solve this issue..

Comments

abdulhaleems’s picture

Dear,
I created a content type CCK image field, But when try to upload it gives error "The file could not be uploaded." How can i solve this issue..

PLease solve this issue very urgent

abdulhaleems’s picture

Project: CCK groups » Image Upload
Version: 5.x-1.x-dev » 6.x-1.0
Component: Code » Miscellaneous
Priority: Normal » Critical
ValerieCBL’s picture

I have the same problem :( I'm trying to use the image field module with image cache to insert thumbnail teasers on the front page that will open into a new window when clicked that will have a image gallery. OMG... this is tricky!

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)

Image Upload has nothing to do with CCK, imagefield or imagecache. It's based on the drupal upload module.

Still, if you can't upload a file from drupal, it's probably due to the permissions of your files folder.

If all this has something to do with image_upload, post more info and I will be glad to help.

Sorry for not looking at the boards guys, I work much and travel much, so sometimes it's much faster to contact me by email ;)

I promise to keep a better track of it in the future.

13rac1’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Closed (fixed)

Closing two year old issue. Re-open if needed.

cblanglois’s picture

Now I'm facing the same problem of "The file could not be uploaded." When I use the upload fields for my newsletter thumbnail and newsletter pdf. How do I solve this> I'm using Drupal 7

mittalpatel’s picture

Did you check if the path given on the File System doesn't have any issue? Watch out on http://yoursite/admin/config/media/file-system and make sure the fields of "Public file system path" or "Temporary directory" are not in red.

cblanglois’s picture

Thanks a lot, Mittal! Solved it. It was, indeed, in red.

talas’s picture

Try to chmod the directory "image" under "sites/default/files/field/" to 777

ankitas-1’s picture

Assigned: Unassigned » ankitas-1
Priority: Normal » Critical
Status: Closed (fixed) » Active
rashmi1’s picture

hello could u plz tell me how did u solved the issue? and which files permissions are to be changed?

Thanks

Ajascosoft’s picture

The first thing is to check in your php.ini file to see if you have file uploads turned on.
Secondly, check your file system settings to ensure that none of the settings is invalid (In red)
If all these are ok, then the issue has to do with permission on the server. Drupal by default stores files in /sites/default/files. With CCk or in drupal 7 when you create a file field, it creates a sub-directory within the files folder.
To effectively solve the issue, change the permission on "/sites/default/files" folder including all files and directories in the files folder.
Example:
cd /opt/lampp/htdocs/[site name]/sites/default
chmod 777 files/
Now drop into the files folder and apply the same permission levels on all contents in the folder (Please note this may have security implications if you do not want some folders to be accessed by certain people on the server)
cd files
chmod 777 *
This solved my problem and i hope it does for you too.

Regards

mark_fullmer’s picture

Issue summary: View changes

In addition to checking the file permissions as Ajascosoft suggests, check file/directory ownership. If the files directory is owned by, say, root, Drupal may not be able to write to it. In this case:

chown -R [your_account_name] files