Skip to main content

Posts

Showing posts with the label upload

Best non-flash upload component for web applications?

I would like recommendations for upload scripts/components. My criteria: No flash Plain Javascript ok, jquery ok Must provide progress bar (updated from for instance ajax call). Probably isn't relevant, but I use ASP.NET MVC on server side. Thanks UPDATE Yes, I know there will need to be a server side component to this, but I can provide that. I'm more interested in the client side scripts. (Perhaps some solutions will be tied to their server side implimentations though - I don't know) Just to clarify - it doesn't have to be .net specific. I'm happy to use a component that only comes with (for instance) PHP server side scripts, and roll my own for .net. Thanks for all the answers - some very useful info there. In the end I accepted the 'AJAX uploader' - It didn't meet the progress bar requirement, but it seems that nothing might (at least without flash). I think I will also look into the possibililty of creating my own, based on

POST a file string using cURL in PHP?

I was wondering if it is possible to post a file - along with other form data - when the file is just a string? I know that you can post a file that is already on the filesystem by prefixing the filepath with "@". However I'd like to bypass creating a temporary file and send just the file as a string, but I am unsure how to construct the request using cURL in PHP. Cheers $postFields = array( 'otherFields' => 'Yes' ,'filename' => 'my_file.csv' ,'data' => 'comma seperated content' ); $options = array( CURLOPT_RETURNTRANSFER => true ,CURLOPT_SSL_VERIFYPEER => false ,CURLOPT_SSL_VERIFYHOST => 1 ,CURLOPT_POSTFIELDS => $postFields ,CURLOPT_HTTPHEADER => array( 'Content-type: multipart/form-data' ) ); Source: Tips4all

iOS app: Uploading multiple files in the background

For iOS, I am aware that apps can upload in the background, as according to this thread: Uploading in background thread in iOS When I refer to "background", I mean the user has clicked the home button, using another app, or the phone's screen is off. Follow-up Questions: 1. Is there a timeout limit to the background uploading? This may be an issue if the file being uploaded is huge. 2. Is it possible to upload a list of files in the background, or does it only support the finishing of one upload that was in progress before the user switched to another app? 3. I suppose if the user quits the app completely, the upload will be stopped? Quitting completely as in, user double clicks home button, touches and holds down on the app until it starts shaking, then clicks the "X" to shut it down.

photo upload field error in magento

Below i have added the code to upload photo. Well i have added photo upload in edit.phtml page only but in register.phtml magento showing error. Can anyone fix it ? error message : Wrong entity ID. app/design/frontend/default/blue/template/customer/form/register.phtml <?php $setup = new Mage_Eav_Model_Entity_Setup('core_setup'); $attr2 = array ( 'position' => 1, 'is_required'=>1 ); $setup->addAttribute(’61’, ‘photo’, $attr2); ?> app/design/frontend/default/blue/template/customer/form/edit.phtml <li class="field"> <label for="photo" class="required " ><?php echo $this->__('Photo') ?></label> <div class="required-entry input-text"> <input type="file" name="photo" id="photo" value="<?php echo $this->htmlEscape($this->getCustomer()->getPhoto()) ?>" title="<?php ech

plupload removeFiles

I'm trying to remove files with not allowed extensions on the FilesAdded event. (I can't use the filter parameter as I need an exclusive list). I have some code a bit like this: uploader.bind('FilesAdded', function(up, files) { var count = files.length; var i = 0; for (i;i<count;i++) { var validExt = validate(files[i].name); if(!validExt){ I need to remove the files added if the extensions aren't valid. I've tried the following: uploader.splice(i,1) uploader.removeFile(files[i]); uploader.refresh(); The FilesRemoved event is fired, but removed files still get uploaded with uploader.start(). I don't know if this is a bug in the program, or too obscure to expect an easy answer to, but if anyone can help, I'd be really grateful. I don't think I'm missing anything obvious. Thanks.