Re: Testing file uploads using SimpleTest web tests?

2013-10-10 Thread Kanaga Lakshmi
field than after submit, where the file field is missing in the $data array. I did some searching and found that SimpleTest should be able to simulate file uploads: File upload testing - Can simulate the input type file tag on http://www.simpletest.org/api/SimpleTest

Need help with file uploads

2013-01-23 Thread Shahruk Khan
I followed this tutorial: http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile *My View / Form* ?php echo $this-Form-create(User, array(enctype = multipart/form-data)); ? ?php echo $this-Form-hidden(User.id); ? ?php echo $this-Form-input(User.picture_file,

Re: Need help with file uploads

2013-01-23 Thread lowpass
On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan shahruksem...@gmail.com wrote: I followed this tutorial: http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper%3a%3afile My View / Form ?php echo $this-Form-create(User, array(enctype = multipart/form-data)); ? echo

Re: Need help with file uploads

2013-01-23 Thread Shahruk Khan
Nope. debug($this-data) still has no other info. On Wednesday, January 23, 2013 1:53:27 PM UTC-5, cricket wrote: On Wed, Jan 23, 2013 at 11:10 AM, Shahruk Khan shahru...@gmail.comjavascript: wrote: I followed this tutorial:

Re: Need help with file uploads

2013-01-23 Thread John Hardy
Check your PHP configuration and ensure that your file upload settings are appropriate for the use-case. Also, print out the _FILES array to also check to see if PHP is accepting your upload. On Jan 23, 2013, at 3:09 PM, Shahruk Khan shahruksem...@gmail.com wrote: Nope. debug($this-data)

Re: Need help with file uploads

2013-01-23 Thread Shahruk Khan
The files were not being accepted. Solved the problem thanks! Just in case anyone has the same problem. You cannot serialize file upload forms via jQuery and pass them to the controller. On Wednesday, January 23, 2013 6:15:59 PM UTC-5, ibejohn818 wrote: Check your PHP configuration and

Progress bar for file uploads

2012-04-16 Thread bs28723
Anyone know of a good progress bar for file uploads? Don't need anything fancy, just something that gives users visual feedback that the large image file they are uploading is taking some time to transfer. Thanks, bill -- View this message in context: http://cakephp.1045679.n5.nabble.com

Re: Progress bar for file uploads

2012-04-16 Thread Tilen Majerle
use uploadify -- Lep pozdrav, Tilen Majerle http://majerle.eu 2012/4/16 bs28723 bill.sto...@boosterwebsolutions.com Anyone know of a good progress bar for file uploads? Don't need anything fancy, just something that gives users visual feedback that the large image file they are uploading

Re: Progress bar for file uploads

2012-04-16 Thread Sebastian Maydana
Use http://www.johnboy.com/php-upload-progress-bar/ -- Sebastian Maydana Interac*team* El 16 de abril de 2012 11:18, bs28723 bill.sto...@boosterwebsolutions.comescribió: Anyone know of a good progress bar for file uploads? Don't need anything fancy, just something that gives users visual

Re: File uploads and Media Plugin

2010-10-28 Thread David Persson
Hi stab, I don't really know about ajax-upload. As I'm using plupload in one of my projects and guess it's similar. You're right the media plugin's transfer behavior doesn't natively handle streams, yet. Here's an excerpt of the code I'm using to workaround that: if

File uploads and Media Plugin

2010-10-26 Thread stab
I'm trying to use this: http://valums.com/ajax-upload/ with the media plugin here http://github.com/davidpersson/media I've got it setup ok, and it is attached to a Document model. I can also get the qquploader uploading fine using it's own examples and class libraries. I need to find a way to

Testing file uploads using SimpleTest web tests?

2010-10-06 Thread psybear83
::_validatePost() fails because when displaying the form there is one more field than after submit, where the file field is missing in the $data array. I did some searching and found that SimpleTest should be able to simulate file uploads: File upload testing - Can simulate the input type file tag

Re: Sanitize::clean breaking file uploads

2010-05-20 Thread Michele Ferri
The file uploads are working fine without Sanitize::clean(). The only solution I see is to handle the file validation/copy logic before executing the sanitization. I'm puzzled. Maybe I should mention that I'm running on my local windows machine using XAMPP. But all the php.ini upload-related

Re: Sanitize::clean breaking file uploads

2010-05-20 Thread Michele Ferri
'])) { [...] // etc etc } } } } No problems encountered using this approach. On May 20, 9:38 am, Michele Ferri zomgs...@gmail.com wrote: The file uploads are working fine without Sanitize::clean(). The only solution I

Sanitize::clean breaking file uploads

2010-05-19 Thread Michele Ferri
Hello. I'm using Sanitize::clean for cleaning the $this-data arrays in the controllers before saving them to the db. example if (!empty($this-data)) { $this-data = Sanitize::clean($this-data); [...] } The problem is that if a form contains a file input, the file is not uploaded.

Re: Sanitize::clean breaking file uploads

2010-05-19 Thread calvin
Were the file uploads working before you used Sanitize::clean? Because cake doesn't handle file uploads automatically. Aside from having to set array('type'='file') in your $form-create() statement, you also need to move/save the uploaded file yourself. Unless you're manually moving the file

Httpsocket and POSTing File Uploads

2010-02-07 Thread Macademic
I am looking to use a CakePHP form to upload a file and then submit it to another website using httpsocket. Is this possible given the current implementation of httpsocket in Cake (i.e version 1.2.6), and/ or will it be available in 1.3? Any info on how to do this appreciated. Stuart Check out

Re: File Uploads: What security-issues I have to take care of?

2009-09-01 Thread the_woodsman
RE The media view - I try and avoid this unless it's a real security requirement, as it means every request for a simple image requires CakePHP to handle it, vastly increasing the load on yoru servers, and the latency for that file. An alternative is to save each file based on a UUID, or similar

Re: File Uploads: What security-issues I have to take care of?

2009-09-01 Thread Miles J
@woodsman - No I agree with you. I was simply showing him the media view because you he wanted to supply downloads/files to users. On Sep 1, 4:21 am, the_woodsman elwood.ca...@gmail.com wrote: RE The media view - I try and avoid this unless it's a real security requirement, as it means every

Re: File Uploads: What security-issues I have to take care of?

2009-09-01 Thread David Persson
A few things to keep in mind are: * Don't just validate against the MIME type submitted by the client, verify the MIME type by inspecting the uploaded file directly. * Image transformations help to prevent some exploits (i.e. by stripping comment metadata). * Uploaded files shouldn't be directly

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread Miles J
Haha awesome, glad someone found it useful :] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread Stinkbug
There is one thing to keep in mind when uploading files and that's the security risks in uploading files to the webroot where people can access them directly. It's generally recommended to upload files to a directory outside of the webservers document root and give them a unique name, so that

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread Miles J
Yeah but thats pretty pointless if your just uploading images. But yes what you said would be the ideal situation if you want to do a download system, or supply files to users. On Aug 31, 4:56 am, Stinkbug justink...@gmail.com wrote: There is one thing to keep in mind when uploading files and

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread DigitalDude
Hey, yeah that's what I intend to do. I used your Uploader to upload files for testing purposes, this works well, BUT I think that the allowed mimetypes are not working as they should. I can upload ANY file, although I allowed only JPEG and GIF to the plugin. That's a bit weird, but I'm sure

Re: File Uploads: What security-issues I have to take care of?

2009-08-31 Thread Miles J
Regarding the mimetype, it allows all mimetypes listed in the config folder. If you want to restrict the type, use the file validation behavior. For the second part of your question. You would do a normal controller action setup like /files/download/1 and then use the media view and your own

File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, in my first real and own project, I want to implement the ability to upload files to a user's account. The filetypes I need to be able to upload are: - PDF - JPG - GIF - PNG - XLS - DOC - OpenOffice Documents - ZIP - RAR Before I start to implement a file-uploading action, I need to

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread Miles J
A few here: - Check the extension as well as the mimetype - Only allow certain types - Check the filesize if needed - Make sure the file is a valid file resource - Make sure there are no errors upon uploading I however have create a file upload plugin. You can use the plugin itself or you can

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, I couldn't wait and tried out your Plugin. And, well, it works like a charme! It does everything I want to do right from the start, the data I need is stored, I can even set the path where the files are uploaded to within the action (so I can save the files in a separate directory for each

Re: File Uploads: What security-issues I have to take care of?

2009-08-30 Thread DigitalDude
Hey, this looks nice, and I like the fact that it can handle mutliple files at one time! I will try to implement this into my project, and then start to customize it to fit my requirements. I want to create some records in the database for each uploaded file, but I'm sure this is gonna work

Unit testing and file uploads

2009-08-10 Thread Fran Iglesias
Hi, I'm working in a plugin for my system to manage uploads. It includes an Uploadable behavior. Is it possible to unit-test the upload part in some way? That is, is there a way to mock a file upload to the server. My B plan is try to isolate the move_uploaded_file() part into a method,

Re: File uploads - getting an undefined index.

2009-06-25 Thread number9
Apologies for the late reply - I solved this, it was a really silly error on my part! I was accessing the array but not the specific field I needed. On Jun 21, 5:37 pm, brian bally.z...@gmail.com wrote: What does the controller code look like now? Specifically, where it interacts with your

Re: File uploads - getting an undefined index.

2009-06-21 Thread number9
OK, so I have solved the undefined index problem - the view file was wrong, it should have been Tip.image instead of just image. However, I changed it to Img.pic so as not to clash with image. I'm now getting the following error when trying to add: Notice (8): Array to string conversion

Re: File uploads - getting an undefined index.

2009-06-21 Thread brian
What does the controller code look like now? Specifically, where it interacts with your ImageComponent. On Sun, Jun 21, 2009 at 11:46 AM, number9xpozit...@gmail.com wrote: OK, so I have solved the undefined index problem - the view file was wrong, it should have been Tip.image instead of just

File uploads - getting an undefined index.

2009-06-20 Thread number9
I'm trying to add the ability to upload files on an existing add method within a controller, but no matter which method I use to try and upload files I get an undefined index error on the name of the field within the view and I cannot understand why. I thought it may have been a problem with the

Re: File uploads timing out

2008-11-01 Thread acoustic_overdrive
Are you using safari by any chance? I sometimes find that safari gets stuck while doing POSTs containing files, while firefox doesn't have a problem and I've never got to the bottom of it. But this was happening to me before I started using cake as well as now. On Oct 31, 11:08 pm, Adam Royle

File uploads timing out

2008-10-31 Thread pj
Hi all, I've been drawn back into cake (and some of you may remember me from WAAAY back - I have ticket number 1 on cake :) , wondering if anyone can help: My image uploads appear to be timing out - I'm using the Authenticate component and some digging has revealed some sort of issue over

Re: File uploads timing out

2008-10-31 Thread Adam Royle
You didn't mention what technique you were using to upload files, however here is one idea. If you are doing a flash upload, some browsers (can't remember which) won't complete the request until data is returned from the server. So in my upload action I always output a space. exit(' '); Also,

Re: File Uploads

2006-12-05 Thread Brian French
also, if you want to store the data of the file in the database instead of just in a file, you should also base64_encode(); the data before saving it to either a blog or text datatype. when you want to retreive you do: ?php // header to let the browser know what type of file it is // saee

Re: Re: File Uploads

2006-12-05 Thread Samuel DeVore
which can have the effect of tripling the data size, just so you keep that in mind when setting up your db On 12/5/06, Brian French [EMAIL PROTECTED] wrote: also, if you want to store the data of the file in the database instead of just in a file, you should also base64_encode(); the data

Re: File Uploads

2006-12-05 Thread [EMAIL PROTECTED]
I wouldn't save to a DB. Just move the file based upon the user id or something and automatically create folders based on the user id or whatever. I would think it to be a security hazard if you did do that. Also, you will increase the size of your db which could degrade performance. People are

File Uploads

2006-12-04 Thread Websta*
Ok so i am having some major issues getting file uploads going on my cake app. Firstly what seems to happen is as soon as i add 'enctype=multipart/form-data' to mthe form in my view, my call to $this-Model-save($this-data) in the controller spits the dummy as the file field is now an array

Re: File Uploads

2006-12-04 Thread Mikee Freedom
Sorry, after a bit of a reread don't forget to record the path of your file somewhere. Either in the database itself or I tend to include it as a constant or attribute of my model so I can move stuff easily. cheers, mikee On 05/12/06, Mikee Freedom [EMAIL PROTECTED] wrote: Hey Paul, File

Re: File uploads, image uploads

2006-06-26 Thread clemos
hi jon and all what is on line 219 of your /myserver/app/controllers/businesses_controller.php ? for file upload, I actually use this component which does perfectly the job : http://cakeforge.org/snippet/detail.php?type=snippetid=36 I've written my own File model, FilesController and stuff

Re: File uploads, image uploads

2006-06-26 Thread poorna
hi friends, if v upload a file ,then the file(which was uploading by me) goes to where?? whether it wil go to database/webserver??? plz reply immediately.. i am new to php... clemos wrote: hi jon and all what is on line 219 of your /myserver/app/controllers/businesses_controller.php ?

Re: File uploads, image uploads

2006-06-25 Thread linkingarts
jb- thanks for the input but that isn't exactly the issue. What I don't quite get is a) why I'm getting an index error, and b) how to populate the db (with the imageFile [name] value in addition to the other values passed by the form) at the same time I'm uploading the file into a specific

File uploads go where?

2006-05-12 Thread roberts.sean
I followed the tutorial found here on handling file uploads, but I'm stuck on one thing. http://groups.google.com/group/cake-php/browse_frm/thread/fe4c9d7739f8be2a/4bede155456ff93f?q=file+uploadrnum=4#4bede155456ff93f Normally when PHP fails a file-upload it gives me a bunch of warnings

Re: File uploads go where?

2006-05-12 Thread roberts.sean
Oh... apparently they go in /app/webroot/img... what a surprise. Nothing to see here :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to