Plupload Image Upload preload images OR add images programmatically - php

I am using Plupload to allow users to upload images in a form. I am able to successfully upload images using Plupload. My program also allows users to save the form and continue editing/posting later. Now when the user resumes the form later I want to pre-load those files in Plupload from the server. I am not sure how to implement this.
I have been trying to implement addFile, but cannot implement. I would like to preload or add files to plupload programmatically.
Link:
Add File Method
Your help would be appreciated!

Related

FineUploader: Possible to upload to different locations based on file type?

Happy Friday!
I was curious if the following was possible:
I'd like to be able to upload media to different locations based on its file type. I really appreciate that Fine Uploader can upload directly to Amazon S3, but I don't want everything to go straight to S3. I'm using WordPress and need to generate different image sizes for uploaded media, so I'd like to upload images to my server for processing and then over to S3 ( via this plugin ). Any other media ( audio, video, etc ) I'd like to upload to S3. What do you think? Is this possible?
Are you ok have two separate Fine Uploader instances? This is what would be required. Essentially, you would have to setup a button tied to a traditional endpoint Fine Uploader, and another tied to a Fine Uploader S3 instance. The buttons could have specific validation restrictions tied to them to prevent users from accidentally submitting an image file to the S3 uploader.
Another option is to provide your own file input element, check the submitted files, and then pass the appropriate file(s) to the appropriate Fine Uploader instance via Fine Uploader's API (addBlobs or addFiles).
Another possibility: just allow your users to upload all files to S3, and pull the each image file back down to your server (temporarily) after they have reached the bucket, modify it, and send it back to S3.
Note that I am working on a feature for Fine Uploader 4.4 that will allow you to specify images sizes via options, and Fine Uploader will scale the images and send each scaled image separately to whatever endpoint you choose. See issue #1061 for details/progress updates.

how to preview uploaded image in php form

i created PHP form for my site, with image upload option on it.
but it only show the image name before image submitted, but i want to view/preview the image/file before submit so how this possible in this?
"file36":{"label":"Select/Upload a Student's Photo","accept":"jpg|jpeg|png|gif|bmt","files":true,"attach":true,"database":true,"maxbytes":204800,"fieldtype":"fileupload","required":true,}},
As far as I know this is not possible with php until you upload the image.
However, you are able to do so with jquery.
Check out http://blueimp.github.io/jQuery-File-Upload/
The old way is to upload the image to a temp folder, create an iframe and load the response there. Then link the temp image from the iframe to a hidden field in the final form with JavaScript. When you submit the form place the image in the right folder. Finally run a cron job every 24-48h to empty out the temp folder.
The new way is the File API supported in IE10+ and all modern browsers. Fallbacks in Flash and Silverlight exist for older browsers.
You obviously misunderstand how file uploads w/ PHP work.
PHP is server side programming language, meaning, it can only execute and access scripts, that are on the server. So, for PHP to access / analyze a picture in any way, it has to be on the server already.
You can upload the file in a temporary directory, analyze it and, if it suits your needs, move to a permanent folder. Otherwise, just delete it.

Uploading multiple photos in a form

I have a photo-upload form that allows a user to upload 1 photo. But my users are complaining that they want to upload many photos. How can I allow them to do that?
Right now I have this form for uploading:
http://www.hikingsanfrancisco.com/account/upload_hike_photos.php?hike_id=58
(I tried to paste code, but it didn't work somehow)
Any thoughts how to best go about it? Is there a way to loop through the selected files maybe? (I am using PHP)
Thanks,
Alex
Add more fields for uploading files, I don't know, maybe file or six, and the upload button will check through php which of them have information to start the upload, 1 at a time or course, in a php loop.
Here is a plugin that uses flash + javascript (MooTools) to do file upload. The upside to this plugin is that it's supported and you can Github it. It can have multiple photo uploads, limit max size, etc, and verify file information before upload. Also, has example for backend using PHP on how files are handled after it is uploaded.
Fancyupload
Features
Select and upload multiple files
Filter files by type in the select
dialog A lot of possible Events to
add your own behaviour
Show and filter useful file information before
the upload starts
Limit uploads by file count, type or size
Platform and server independent, just needs Flash9+ (> 95% penetration) which works on all browsers with it installed
Here is the jQuery plugin that does the same as the MooTools one:
Uploadify
Add new file inputs. Or use smth like swfuploader for file uploading.

Upload an image using class.upload.php via AJAX, display image in form using jQuery

I am using class.upload.php to handle an image upload from a form that submits employee details to a MySQL database. class.upload.php does EXACTLY what I want it to do, resize the image and rename it - what I am now trying to accomplish is to upload via Ajax after the user selects the file and then display it in the form while they continue entering details. How would this best be accomplished with jQuery?
I have used Uploadify to serve this purpose on several websites. It works quite well once you get the hang of it.

Free java or flash file browser for photogallery

I'm about to develop a small web gallery, where it's supposed to be possible to upload several pictures at a time and then add some info abut the pictures.So I need a free java or flash local file browser that can pass me some info of the pictures that gets uploaded so that I can create some SQL entries for each picture.
The platform for the project will be PHP and MySQL.
Any good recommendations?
I think what you are looking for is SWFUpload.
From the feature list:
Upload multiple files at once by ctrl/shift-selecting in dialog
Javascript callbacks on all events
Get file information before upload starts
Style upload elements with XHTML and css
Display information while files are uploading using HTML
No page reloads necessary
Works on all platforms/browsers that has Flash support.
Degrades gracefully to normal HTML upload form if Flash or javascript is unavailable
Control filesize before upload starts
Only display chosen filetypes in dialog
Queue uploads, remove/add files before starting upload

Categories