I want to make a file uploader with Flex.
However, I want it to select a folder and upload all the files in the folder.
It would be much better if I can actually check the files before uploding.
I'm using Flex with JSP in the back-end.
Is there a way to do this?
So far, all I found from googling around is how to make file uploader for uploading a single file.
You can upload multiple files using the FileReferenceList class. There is an example at the bottom of the link.
When the FileReferenceList.browse() method is called and the user has selected one or more files from the dialog box that the browse() method opens, this property is populated with an array of FileReference objects, each of which represents the files the user selected. You can then use this array to upload each file with the FileReference.upload()method. You must upload one file at a time.
Related
I am trying to upload file using choose file robot framework keyword. When I execute the test it runs successfully but the file is not uploaded.
Here is my HTML
I would like to click on Upload Study button to browse the file.
I tried following :
choose file xpath=(//button[contains(.,"Upload Study")]) Study_File.csv
But it is not uploading the file. Is it because input type=file is not present in the xpath I used? If so how should I create the xpath?
The choose file keyword requires that you give the locator to an input element, not a button. From the keyword documentation:
Inputs the file_path into file input field locator.
You probably want a locator like id:fileUploader
If you have already tried using the <input> element as the locator, then my next guess would be that it can't find the file you're trying to upload. You have referenced the file as simply 'Study_File.csv', which suggests it's in the same directory as the test file. If it's located elsewhere then you need to provide a path to it relative to the location of your test file.
I've been using yogiben/meteor-autoform-file, which is pretty awesome for uploading files directly to CollectionFS! However, uploading many files is a pain for the user: The user has to click the "+" icon once for each file to upload, and then select each file individually.
I could also use something like Blueimp JQuery File Upload for the multi-file select, but then the files don't get written to CollectionFS.
Is there an easy way to do multi-file select and have the files written to CollectionFS?
I used https://github.com/tomitrescak/meteor-uploads in a previous project. It supports collection-fs, has drag-n-drop and multiple files features. Maybe not as simple to put in place than yogiben's package but still. Take a look as it might fit your needs.
i need to change the automatically generated index.html flex output to admin.anotherExtension. I understand that if i change the index.template.html the changes in html level will be preserve when the file is generated, however i need to change the name of the file also, and the extension.
Thank you! (using flashBuilder4)
In the html-template directory. Create a new template file named something like this:
${application}${build_suffix}.template.cfm
The next time you build your project, you'll get a file with the extension .cfm that is the same name as your application. You can use whatever extension of your choosing. My source
If you create your own file in the html-template directory (say: index.cfm ), I'm pretty sure that file will be copied to your build directory, but not changed.
Keep in mind all your changes will be overwritten if you change the Flex SDK on the project. Back them up somewhere.
I am developing custom upload module. I want to allow users to upload xls and xslx files only. How can I restrict this using file_save_upload function. Thank you
You should probably use the validate function for the form that has the file upload element on it instead. Or perhaps consider just using the File CCK element and using its settings to only allow files with xls and xlsx extensions to be uploaded - that would probably save you a whole lot of time.
The file upload control in asp.net does not allow me to select a folder and enables me to select only the files. Is there any way in which I can select a folder (obviously without using the file upload control).
Why I want to select the folder is basically to store its entire path in a database table.
The HTML <input type=file> element only supports single file uploads. If you to have multiple file upload, you would have to use a 3rd party component - usually written in Flash.
Here an example: http://www.codeproject.com/KB/aspnet/FlashUpload.aspx
No, browsing for files are the client-side feature, and the only information about file path is their name. It's cause security.
I dont think HTML supports what you are trying to do. Perhaps as a workaround you can have them select a file in the folder and then chop off the file name when processing it but thats a mess to be honest.
Ask them to Paste or type the path into a textbox perhaps. The issue here is you cant check for typos.
Id say you should rethink what you are trying to do.