multiplefile uploader select and show multiple files at once - yii

i want a multiple file uploader (not ajax) for my form.. The features i needed are:
1) ability to select multiple files at once
2) after selection it should display all the filenames (or image) with a button to remove any pic
3) should be able to set number of files limit, file type and file size limit
4) when i submit the form, i should get an array of these files which i can save one by one to a folder and corresponding file names to a database table.
fortunately yii has got the widget 'CMultiFileUpload' which serves almost all my purposes except that when i select multiple files and click open it only shows the first file name with a remove button.. i want it to show all the selected files at once..
Eg: i select 3 files (i can select multiple files by giving 'multiple'=>'multiple' attribute) and click open then it should show
[removebutton]file1
[removebutton]file2
[removebutton]file3
ll the ajax uploaders have all these functionalities but i cant/don't want to use an ajax uploader because, suppose someone uploads many files using ajax uploader and he then decides to cancel the actual form submission, all the files he uploaded will be there in my uploaded folder, which leads to wastage of space and i have only a limited amount of space in my server. is there any way that i can do this using 'CMultiFileUpload' or is there any other way by which i can do all this? Please help

hope this help your answer,the multi upload in yii http://www.yiiframework.com/wiki/176/uploading-multiple-images-with-cmultifileupload/

Related

Automating Split, Save Name and Error Checking with Acrobat Action Scripts?

I'm considering convincing my company to upgrade to Acrobat Pro so I can automate the processing of my scanned documents. Before I bring it up, I want to make sure the things I want to do are possible. I don't need anyone to give me the code, I just want to know if this is possible.
The documents i'm working with are landscape, 2-5 pages, and have the filename and page numbers in the footer. I want to scan a big stack of them and have a script perform the following actions:
Use OCR to acquire the filename and page numbers for each page. I would like to restrict the OCR to only look at the footer to save time and RAM.
Using the filenames, I want it to detect when one document ends and the next one begins so they can be split into separate files.
Before saving the split files, check that the number of pages in the file matches the page total in the footer. (I work in a factory and the documents can get sticky, so my scanner frequently pulls two pages at once)
Instead of saving the files where the page total doesn't match, compile a list of the errors so I know which documents need to be rescanned.
Finally, save all correct documents with their filenames from the footer to a folder on my desktop.
This could save me hours a week, so I'm hopeful that it's all possible. Thanks

How can I upload a whole folder of PDF files, So that I can skim through each file without having to upload each one of them individually

I have a folder of PDF files, what I want to do is build a small app with directional arrows that when pressed should upload the next PDF file from the uploaded/Selected folder.
I have tried uploading single PDF and I was able to view it, but I'm unable to find any good resource on how to upload a whole directory inside the application for me to not upload each PDF every single time.
I should be able to change my current opened PDF to the next one inside the folder.
The way to do this in Vue is as follows:
Make a input field and attach the event "v-on:input" with the function that will be called when the input is selected.
Don't forget to add "webkitdirectory mozdirectory" for firefox and chrome browsers.
Inside the function fetch the input query via "document.querySelectorAll('input');". The information of files will be inside files object.

How to batch add logos to different images

i have almost 5k different logos and also have 5k different images, i want to add them up, is there any tool or way to do this.
I have seen tool which add one logo to all images, but it don't work with my scenario, i need a tool or way which allow me to multiple logos to add on multiple files, for example
image 1 + logo1.jpg= image and logo1.jpg
image 2 + logo2.jpg= image and logo2.jpg
and soo one.
is there way to do this work quickly instead of editing every pic manually
You could achieve this by creating actions and then using batch actions on folders containing the files. If you sort all the images you want to have logo1 into their own folder, you can use a batch action to add the logo to every image in the folder and then save the new image as a jpg in a different folder.
Here is a short youtube video explaining batch actions, and here is a much longer, more detailed video that's officially from Adobe. If you don't like videos, this page explains the process with graphics.
In short, here's what I would do:
Sort all the images you want to have logo 1 into a folder.
Open logo 1.
Select all and copy the logo.
With your logo still on the clipboard, open the first image.
Go to Windows --> Actions
Hit the little paper peeling icon to create a new action
Hit the record button to record your action and name it something you can remember later.
Paste your logo, and place it where you want it.
Go to Layers -> Flatten Image
Stop recording (or you might record how you save, but this doesn't always work. If you do save, don't save over your original, rename it!)
Go to File -> Automate -> Batch, and choose the action you just saved, and select the folder you want to save the new logo-ified images into.
Carefully set all the save options
Click Run!
If you get prompted to choose color options on every save, you might want to redo the action so it includes (or does not include) "save as" options.
This is the short version of the answer. I'm sure there are ways to script it, too, but this may be easier if you're not familiar with scripting.

Moodle PHP filehandeling

My problem is that we have made an block that opens a page witha a mform on it. And we use the editor element to start the tinyMCE editor, on the page. But when we save the output, the images oploaded to the text field is only viewable to the admin (the person who uploaded it) and in the mdl_files it sets it to be a draft file. I have been through the documentation, and i might have lost the context on the new page, but im not sure.
In Moodle, files uploaded to a form (either to a filemanager element or a text editor) are stored in a temporary 'draft' area while the form is being edited.
This is so that the actual files are not changed until the form is submitted (e.g. if an admin changed the image embedded in some text, deleting the original, you do not want anyone viewing the page during the editing to see a broken image link).
When working with files embedded in a text editor in Moodle, you need to make sure you copy all existing files into the 'draft' area before you show the form, then copy the 'draft' images into the real area, after the form is submitted.
See https://docs.moodle.org/dev/Using_the_File_API_in_Moodle_forms#editor for details about how to do this.
Please also note that your plugin will also need a PLUGINTYPE_PLUGINNAME_pluginfile() function in its lib.php, in order to authenticate any file requests from the user's browser and return the file contents. See any of the core activities for examples of this (e.g. mod/data/lib.php - function data_pluginfile()).

File attachment from HTML form doesn't get replaced on Domino server

I have a Domino database that stores documents with file attachments. The file attachments are stored in the Body RichTextItem as attachments.
For managing these documents I have an HTML form containing a file upload field.
Now, when I upload a file whose name differs from the current file in the document, everything works fine, and the uploaded attachment replaces the previous attachment.
The problem is when I upload a file that has the same name as the already existing file. In the WebQuerySave property of the form I call a LotusScript agent that should replace the old attachment with the one from the HTML form.
But in this agent I see two items called $FILE that have the same FileName. When I access them, I cannot distinguish these two items. I tried:
document.GetAttachment(filename) – obviously doesn't work, since the names are the same => I can only access the first attachment.
ForAll item in document.Items – I visit two items having the name $FILE, but both items are the same: the modification time is the same, the filesize is the same.
I could get all the attachments and remove all of them but the last. But is there any guarantee that the last item is the one from the HTML form? Or I could first extract the modification time from all the attachments and remember the newest. That must be the attachment from the HTML form.
Or is there a simpler solution?
For reasons like this behavior and several others, I have built most of the basic web facing Domino applications to store attachments on linked documents instead of the primary document. That way they can be accessed easily and do not get updated or modified except when they are supposed to be.