Setting file extension for flex download

Hi, I have a flex/flash download app that I use on my website, but a lot of people have trouble with it because they rename the file and accidentally remove the .zip from the end of the file name.  Is there any way that i can prevent this?  I have noticed that when i click to download, the "Save as Type" drop down is blank.  It looks like this:
File name: myFileName.zip
Save as type:
I'm hoping that im just missing a param that i can set to .zip so that it will look more like this:
File name: myFileName
Save as type: .zip
Thanks!

Hi,
You can restrict them to save in any other format by making the check.
Simply add listner for the Event.OPEN on the fileReference and inside this check for your allowed extension,if the extension is not what you want then
simply right a line there like:-
fileReference.cancel();
And addtionally you can give any alert that your file should be of that particular extension.
with Regards,
Shardul

Similar Messages

  • How to set default .PDF file extension for Form Downloads

    I am trying to find a way of setting the PDF file extension when I download forms.
    I author the forms under a Plus subscription and am then downloading the forms under a basic subscription Collaborator account (diffrent person)
    If I don't include .pdf as the file type when downloading a form with a unique name as the Collaborator, it downloads without a file extension.
    Remembering to continually add the pdf file extension is a pain so I'm hoping there is away of setting this as a defaulet for my 'collaborator' account ?

    Firstly, apologies for multiple posts, I received messages saying my comment hadn't posted and also checked my history before re-submitting.
    Okay, the process is
    1. Log in as the Author account and I can rename the file without having to set the extension
    2. Log in as the Collaboartor account - same PC, browser etc and it doesn't save with a default file extension; HOWEVER, I have done this whilst also being logged in on a diffrent browser as the Author
    3 I have just tried logging out as Author and only being in as the collaborator and the form downloaded with a default PDF.
    4. I had someone else log in as the collaborator from thei PC and browser whilst I was still signed inunder my author account and again they were unable to save as PDF by default
    This has me wondering if there is anything at play when you've got multiple Users?

  • Setting file name for a downloaded file

    I've set up a file download using code I've gleaned from jsf forums. However, the file name is not being set correctly. When the user downloads File.doc, it shows up as downloadPage.jsf. Am I setting the header correctly?
    public class VendorInfoBean extends AbstractViewController {
        public VendorInfoBean() {
        public String downloadVendorApp() {
            ExternalContext context = getExternalContext();
            String path = context.getInitParameter("externalFiles");
            String filename = "Vendor_Application_e_Form.doc";
            String fullFileName = path + filename;
            File file = new File(fullFileName);
            HttpServletResponse response = (HttpServletResponse) context.getResponse();
            response.setHeader("Content-Disposition", "attachment;filename=\"" + filename + "\"");
            response.setContentLength((int) file.length());
            response.setContentType("application/msword");
            try {
                FileInputStream in = new FileInputStream(file);
                OutputStream out = response.getOutputStream();
                // Copy the contents of the file to the output stream
                byte[] buf = new byte[1024];
                int count;
                while ((count = in.read(buf)) >= 0) {
                    out.write(buf, 0, count);
                in.close();
                //out.write(bytes);
                out.flush();
                out.close();
                FacesContext.getCurrentInstance().responseComplete();
            } catch (IOException ex) {
                ex.printStackTrace();
            return null;
    }

    StringBuffer sbFilename = new StringBuffer();
         sbFilename.append("adeem");
         sbFilename.append(".doc");
    StringBuffer sbContentDispValue = new StringBuffer();
         sbContentDispValue.append("attachment");
         sbContentDispValue.append("; filename=");
         sbContentDispValue.append(sbFilename);
    HttpServletResponse response = (HttpServletResponse) context.getResponse();
    response.setHeader("Content-Disposition", sbContentDispValue.toString());
    i think this will work .. if not let me know i will give some code that will work for u then ...

  • Set file filters in flex for save, not for browse

    How can i set file filters in flex for save, not for browse?
    Right now i am using filereferce class for saving purpose but i could
    not able to set filter. We can easily do it for browse.

    You can try to delete [http://kb.mozillazine.org/mimeTypes.rdf mimeTypes.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    * http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    Create a new profile as a test to check if your current profile is causing the problems.
    See:
    * [https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile Basic Troubleshooting: Make a new profile]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • File extension for: cl_gui_frontend_services= file_open_dialog

    Hello,
    I would like to set the file extension for cl_gui_frontend_services=>file_open_dialog such that my default extension in the file open dialogue is the .csv (comma-separated value) file. May I know how can I do that?
    Thanks!
    Regards,
    Anyi

    Hello,
    Thanks for the quick reply.
    Howeer, I tried to use the extension of CSV and the file dialogue opened up with .RTF (which is the default extension) instead.
    Any comment on that?
    Thanks!
    Anyi
    > HI,
    >
    > Here is the code
    >
      DATA:  l_title TYPE string,
    >          l_dfext TYPE string,
    > l_dfinm TYPE string,
    >          l_file  TYPE string,
    > l_path  TYPE string,
    >          l_fpath TYPE string.
    > le = 'SAVE FILE PATH'.
    >   l_dfext = 'csv'.
    > l_dfinm = 'Error_Idoc'.
    >
    > CONCATENATE l_dfinm sy-datum sy-uzeit INTO l_dfinm
    >  SEPARATED BY '_'.
    >
    > CONCATENATE  l_dfinm l_dfext INTO l_dfinm SEPARATED
    >  BY '.'.
    >
    > CALL METHOD
    >  cl_gui_frontend_services=>file_save_dialog
    >    EXPORTING
    >    window_title      = l_title
    >    default_extension = l_dfext
    >    default_file_name = l_dfinm
    >     INITIAL_DIRECTORY = L_DIR
    > CHANGING
    >       filename          =  l_file
    > path              =  l_path
    >       fullpath          =  l_fpath
    > CEPTIONS
    >       cntl_error        = 1
    > error_no_gui      = 2
    >       OTHERS            = 3.
    > s,
    > Richa

  • Custom File Extension for Microsoft Access Text Driver (*.txt, *.csv)

    I'm trying to use a custom file extension for the Microsoft Access Text Driver (*.txt, *.csv) driver.
    I have updated the FileExtns registry to have my new extension.
    When I issue the following it does not work.
    select [NoName] 
    from openrowset('MSDASQL'
               ,'Driver={Microsoft Access Text Driver (*.txt, *.csv)};
                    DefaultDir=c:\filedir'
               ,'select * from "file.lst"')
    If I make the file a .csv it works fine.  However, if it has an extension of not CSV or TXT (in this case .lst, which is in the registry setting) extension it throws the following error and cannot seem to find a solution to it. 
    OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Text Driver] Cannot update. Database or object is read-only.". Msg 7350, Level 16, State 2, Line 1 Cannot get the column information from
    OLE DB provider "MSDASQL" for linked server "(null)".
    In addition, (although I can probably find this elsewhere), I need to have the first line 'BLANK' so that it does not miss data (there is no header row).  Is there  a way to use OPENROWSET without BULK to basically include all rows as data?
    Any help is appreciated.

    Hi,
    According to your description, I did a test with your script, and got the same message as your post. Usually, by default, the Microsoft Access Text Driver (*.txt, *.csv) supports the four extensions file, such as *.asc, *.csv, *.tab, *.txt. To solve this issue,
    I recommend you try to save the LST file in the above format, then use OPENROESET to get data from the supported extensions file in SQL Server.
    In addition, the
    OPENROWSET function is mainly used to retrieve remote data from an OLEDB data source, when you use OPENROWSET without BULK, provider_name is a necessary parameter in the script. However, the OPENROWSET (BULK...) is mainly called from a SELECT…FROM clause
    within an INSERT statement, when importing bulk data from a data file into SQL Server table. Thus if you need to import bulk data, you should use the basic  syntax: INSERT ... SELECT * FROM OPENROWSET(BULK...), also there are some alternatives, such as
    BULK INSERT
    and
    BCP .
    Thanks
    Lydia Zhang

  • Default WorkBook file extension for all users of BEx 7 in Offce 2007

    Hi Experts
    We recently started using office 2007 with BEx 7.
    However, many users still has Office 2003 installed.
    I am looking to set the default file extension for all users to be .XLS.
    I know that this option is available in Client level (Global Settings - Use XLS file format ) but I require that the checkbox will be automatically checked.
    Is there a way to do it?
    Thanks,
    Yaniv

    Hello Yaniv,
    Yes, you can maintan them globally.
    this can be done in registry under :   HKEY_CURRENT_USER\Software\SAP\BEx\Analyzer.
       UseXLSFileFormat
       Type: String Value
       Value true or false
    For more information refer to SAP Note 1254112
    Regards,
    Arvind

  • MacBook Air, can I partition my Mac external drive to have an ISO image file location for Windows downloads?

    Hi, in preparation for installing bootcamp and windows 7, and in the absence of a DVD drive on my MacBook Air, can I partition my Mac external drive to have an ISO image file location for Windows downloads?

    The Boot Camp instructions are located here: http://www.apple.com/support/bootcamp/
    The Boot Camp Discussion Community is located here: https://discussions.apple.com/community/windows_software/boot_camp

  • Is there a setting that allows for simultaneous downloading and watching of a rental movie on ATV?

    Is there a setting that allows for simultaneous downloading and watching of a rental movie on ATV?

    Apple TV has no storage, it is caching the movie and needs to load a portion before playback starts. The time it takes is dependent on your network.
    What is your current connection via speedtest.net?
    Make sure DNS is set to auto (settings - general - network)
    If on wifi try ethernet

  • What is the best file extension for import?

    When converting a DVD to another file extension for FCP, what is the best file extension to use? When I was using Adobe products, I would convert the DVD with Stream Clip to an AVI or MPEG and bring it right in. I found these do not work well in FCP. I know I can play it in and make a capture, I was just trying to find what file extension I should use to bring it right into the browser. I receive some DVD's that are quite long and would rather convert them to another extension instead of playing it in to capture.

    In MPEG Streamclip, use the export settings that match your FCP Sequence settings. Typically that would be QuickTime DV/DVCPro (NOT .DV Stream).
    Here's a 2 part tutorial on MPEG Streamclip by Nick Holmes:
    http://discussions.apple.com/thread.jspa?threadID=2059475&tstart=0
    http://discussions.apple.com/thread.jspa?threadID=2070861&tstart=0
    -DH

  • File formats for uploading/download

    Hi Experts,
    Loading of data(master/transaction) involved two steps.
    1. Loading file to Data files folder .
    2. From Data file folder to BPC application.
    For step1, what are BPC allowed file formats? Is it only .txt & .csv?
    For step2 , what are BPC allowed file formats?
    For downloading data from BPC to flat files, what are allowed file formats?
    thanx,

    Hi,
    You should be able to check the DEFAULT_EXTENSIONS parameter in the application set parameters to see what is allowed and control allowed file types. You can see the documentation on this topic here: [http://help.sap.com/saphelp_bpc75_nw/helpdata/en/f7/d21edd2f4c4f78b0a5be2b16e19ca1/frameset.htm]
    As far as file types for export, this is determined by the data manager package exporting the data. I believe the delivered data manager packages usually export in a CSV format with a file extension of your choosing, but a custom package could export data in any format required.
    Ethan

  • Setting file permissions for 'wheel' group files

    I have a bunch of files I copied from my PC when I made the transition to my Mac. I'm having problems moving or backing up many of the files apparently because the Mac has set the group for these files to 'wheel' and I'm not sure how to change them back. My efforts to chown or chgrp the files always result in "Operation not permitted" error messages.
    I have been able to select a file at a time in the finder and use the get-info option to change the permissions, but I need to do this for thousands of files and it takes too long manually.

    mpender wrote:
    I have been able to select a file at a time in the finder and use the get-info option to change the permissions, but I need to do this for thousands of files and it takes too long manually.
    Yes, you need a global fix. Download BatChmod Read the online documentation and online help. Let us know.
    -mj

  • Set file extension (.jpeg)

    Hi folks
    I made a VI where I capture pictures whenever I hit a boolean and they are automaticly saved in a map with the names 0,1,2,3,4,5,... ,  but that ain't important for my problem. I use the IMAQ write file2.vi to write my file to the set file path. This .vi got the function to save the image as a .jpeg, .bmp, .png, ... . I select the .jpeg extension, but when I go to the files they are shown like this (without the .jpeg extenstion).
    I guess that there is an easy solution to add the .jpeg extension after the file name, but I can't find anything.
    Besides that there is something else which stands apart from the .jpeg issue.
    I am taking a lot of pictures under different angles of an object and also save them like the example above. After I took all the pictures I want to proces them, so in order to do that I have to save the images together with the angle. I know that in NI Vision calibration information can be saved with the pictures in a .png file, but I was wondering if this also could be done with your own information. If this is not possible, is there maybe another solution to this?
    Kind regards
    Ruts
    Solved!
    Go to Solution.

    Append the string file name with ".jpeg" (without quotes).  Do this by using the concatenate string on the string palette.  Post some code if you are having troubles.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Set of extensions for fileupload

    Dear professionals,
    I have the following question:
    I use fileupload component for uploading files and the requirement is to restrict selection of files to be uploaded to only image documents. When I use this component, at runtime it allows selecting only 3 classes of documents: all files, image files (but only jpg and jpeg formats) and html.
    these Image formats are a good solution but the list of allowed formats is too little and I'd like to extend it with .bmp, .tiff etc. Is there a standard solution for doing it, probably these values (jpg and jpeg) are stored in a table I can extend?
    Thanks in advance!
    Edited by: Drabkov Anton on Nov 30, 2009 11:07 AM

    Hi, thanks for your reply!
    I examined this thread but as I understand it's topic, it's not exactly what I need. I don't wanna check file extensions at runtime AFTER USER INPUT (USER FILE SELECTION).
    I mean that when I call FileUpload component during WD execution I want to define my own set of extensions in the popup window for selecting files.

  • Is .Flex the Extension for Flex?

    I have a license file that was emailed to me for a software product we use (not related to Adobe). The extension of the file is .flex. Is this the extension of Flex Builder? I don't know anything about Flex. How do I use it? We really need a .dat file. Can flex be converted to dat?
    BTW, the company that emailed the file will not return my messages regarding inquiries about the file or if it can be converted to .dat.
    Thanks!

    Flex is an SDK use to build Flash Applications.  It doesn't have a file type / file extension associated with it directly.
    The code files that the Flex Compiler processes are usually ActionScript fies ( .as ) or MXML Files ( .mxml ).  The compiled results are either Flex Components ( .swc ) or Flash Movies ( .swf ).
    I don't think your ".flex" license file has anything to do with Adobe Flex.
    Google on .flex file extension and a few things come up:
    http://filext.com/file-extension/FLEX
    http://www.computerfileextensions.com/file-extensions.php/FLEX

Maybe you are looking for

  • Why do my contacts disappear when i turn my icloud off?

    I don't know that much about icloud but i signed into it anyway and have it on. and one day i though no point in having it on so i turned icloud off and the next day i noticed all my contacts where gone. so i paniced. i tried the back up from my comp

  • Podcasts no longer show up in playlists. Howto downgrade to iOS5?

    After installing iOS6 I discovered, to my horror, that Apple decided I'm nolonger allowd to listen to podcasts though the music player on my iPod. Every day, for as long as I have an iPod, I have created a playlist in iTunes containing a mix of music

  • Memory leak in java / forcing garbage collection for unused resource?

    Is there any possibility in big programs if not designed properly for leakage of memory? If say i forget to force garbage collection of unused resouces what will happen? Even if i am forcing garbage collection how much assurity can be given to do so?

  • IPod Touch won't rotate to landscape after 3.1.3 update??

    Please help me :(! I installed the 3.1.3 update last night and ever since, when I turn my iPod horizontally it will not go into landscape mode in Safari or Music or anything. If i watch a video or use an app that requires it to be in landscape mode i

  • Substring replacement

    Hello, i have a String like this one: String input="someText 'dothis' anotherText 'second \'Command\' is easy' itgoeson " and a method public String handle(String str){ What i want now is to replace input with String newInput="someText "+handle(dothi