Link to home
Start Free TrialLog in
Avatar of Coast Line
Coast LineFlag for Canada

asked on

cffile upload question

i have a cffileupload which do the uploads successfully, now my concern is i want to add few extra fields to it,

Based on the above, i have come up with an idea that store the uploaded images to the virtual RAM and then clicking on the Submit button which i have defined the Extra fields like watermarking,, blurring, posturing erc, should do on the images stored on the virtual ram and then each processing of an image store the relevant images to its corrosponding folder

is the way i am doing is OK, if yes, Please guide me how do i proceed furthur as an sample application

Thanks
Avatar of Pravin Asar
Pravin Asar
Flag of United States of America image

First of all, cffileupload  post the form contents with actionscript post. It will not pickup the other form variables.

Looking at problem statement, looks like following workflow might by good

1. Load the file to temp storage area.
2. After loading , take user to display the latest files.
3. For each uploaded file, ask user what actions he expects you to do (such as watermarking,, blurring, posturing etc).
4. When form  is submitted do the requisite action for each file and save to final destination.

This may give you, option to perform, different set of actions with each image file.
Avatar of Coast Line

ASKER

so u are saying is

1. do the cffileupload first in the temp right

2. then create a new page to create the watermarking stuff or something like this and then it actually process them right

like splitting them in 2/3 different pages to make the process easier to flow

any sample?
u did not answered yet
ASKER CERTIFIED SOLUTION
Avatar of Pravin Asar
Pravin Asar
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks But i have a question here, i been to split the cffileupload to work, currently moving all the images to the temp folder, now the issue is

i want to move all the files to fullimages folder which i am doing through the cffilke move tag, upon moving, i think i have to loop over all the images one by one so that it can run everytime and create the respective watermark or blur everytime it needed.

But i am confused, will not this process consume too much resources, because if i upload 100 files in cffileupload in temp directory and then i am moving all those files to fullimages folder and then looping over them to actually store to their respective folders and also do the resizing, postering, scaling at the same time

and save in DB too
For a multiuser scenerio, best option

1.create a unique temp directory (may be use timestamp as part of name). this is where users files will be uploaded.
2. Get the listing of files from the unique temp directory.
3. Ask Processing Options
4. Process the files
5. The processed files will be saved at desired location.
5. After processing clean-up the unique temp directory
6. Delete the unique temp directory

what scenario asked is that the best option of not, because still i have to loop over each single image and finish its processing and move again
Is that the approach you have to take, considering cffileupload does update the file differently than the conventional form  post/submit action.


If you uploads 100 files, you have no option but to process these 100 files.

Thanks,


well not sure, but how can i make use of cfthread tag inside or outside the loop to make the processing faster enough for this type i am going ahead
You have other options (such as batch at a specified time).

Once cfthread is created, you will running multiple instances of thread (as forked by loop).


look at this post

http://www.bennadel.com/blog/1859-Executing-A-Recursive-CFThread-In-ColdFusion-9.htm


let me work out on this, i will write some kind code and share here