Next I am attaching the uploaded file and sending an email. Everything
is working fine.
BUT, If I attach a big size file or Image, the file will not be uploaded
completely. For Example If I upload a big image, I ll be able to see
only half of the image, can anyone tell me the reason and solution to
this problem.
Next I am attaching the uploaded file and sending an email. Everything
is working fine.
BUT, If I attach a big size file or Image,
What exactly is a big size file? I mean, starting from what size is
considered big?
the file will not be uploaded
completely. For Example If I upload a big image, I ll be able to see
only half of the image, can anyone tell me the reason and solution to
this problem.
Maybe you’re getting some timeout error?
Maybe you can try some plugin for file upload such as attachment_fu or
paperclip or anyone you like.
Is there any reason why you’re not using some of this and doing the
file creation by hand?
when it goes to the action I will be getting the files attached in
params[:file_1], params[:file_2]… etc. params[“file_nos”] is number
of files being uploaded and thus it should loop that many times.
After the files are uploaded I am attaching all the files in the mail
and sending them.
So here is my problem,
The files attached in the mails are not complete. ie if i have upload
any file, there will be all attachments but they wont open, some images
uploaded will display only half.
But I am not getting the attachments properly in my email. If you can
send your email ID I will send an email to you through my app, so that
you can tell me what is the problem
You’re not closing the file you create, which could conceivably cause
problems (if you use the block form of File.open you don’t need to
worry about that)
is nicer because it ensures the file gets closed (obviously you could
replicate this yourself but File.open already does it so not much
point)
But I am not getting the attachments properly in my email. If you can
send your email ID I will send an email to you through my app, so that
you can tell me what is the problem
Sounds like you need to isolate the problem: is the mailer fine but it
is being given half uploaded files, or is the uploading part happening
file but the mailer is ok?
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.