Default extension in FileReference.download

As part of my Flex application users can save their work to a text file on their local machine.  They can then later load these files.
Both loading and saving use a FileReference object, and bounce the files off the server as needed.
It all works pretty well, but the problem is that if the user decides to overwrite the filename there is the very real possibility that they will forget to add the extension.
For example, the default name comes up as "untitled 1.txt", and they just type "myfile".
The result is that when they then go to load the file it does not appear - because I am filtering for just ".txt" files.
It's pretty normal in a Windows application to automatically append a default extension, but I can see no equivalent in Flex.
Is this something that can be done?
If not are there any good workarounds?
Thanks

It's disappointing that it doesn't have the option to add an extension.  I can possibly understand if it disallowed ".exe" as a default, but apart from that I can see no good reason for this omission.
In the end I just added a SELECT listener, where I check the saved name, and if the extension is missing I warn the user that they should go and rename the file.
It's a bit clumsy in my opinion, but because the SELECT event comes AFTER the file has been saved, there's no way to cancel the download, so a warning seems like the best that can be done.

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?

  • FileReference#download() and filename question

    On the server side I set a HTTP header as
    Content-Disposition: attachment; filename=myfilename.txt
    Is it possible to get this information in Flex client? The FileReference#download() function gives a possibility for a name to set on the file browser, but I can't figure out how to get it from the server. By default, the function uses the remote URL.
    Any ideas?
    Thanks.

    Lawcats please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install the Adobe Creative applications included with your membership.

  • File extension in filereference

    How can I add a file extension when i download a file using FileReference?
    Every time the save dialog box appears i get the filename, but not the file extension.
    Any help?

    For others if they would like to see:
    set audEXT to {"mp4", "m4a", "mp3", "aif", "aiff", "wav", "m4r"}
    property FoldersToMake : {"AUDIO", "VIDEOS", "Python workspace", "Documents", "PHOTOS", "Quartz Compositions", "Other"}
              tell application "Finder"
           repeat with newFolder in FoldersToMake
                                            try
                                                           make new folder of folder "CleanUP" with properties {name:"" & newFolder & ""}
                                            end try
                             end repeat
              end tell
              move (every file of desktop whose name extension is in audEXT) to the folder "AUDIO" of folder "Stuff"

  • FileReference download location

    Hello,
    Is possible retrieve the location of a file downloaded with the FileReference.download() method? After the user receives the prompt to download and selects a location I would like to be able to retrieve that location.
    Thanks,
    Scott

    for a web-based app it only works in response to a user even like a mouse click or keyboard event. 
    When you use this method , consider the Flash Player security model:
    Loading operations are not allowed if the calling SWF file is in an untrusted local sandbox.
    The default behavior is to deny access between sandboxes. A website can enable access to a resource by adding a URL policy file.
    You can prevent a SWF file from using this method by setting the  allowNetworking parameter of the the object and embed tags in the HTML page that contains the SWF content.
    In Flash Player 10 and Flash Player 9 Update 5, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse click or keypress event). Otherwise, calling this method results in Flash Player throwing an Error exception.

  • Uploading files Mime Type not correct for Office 2007 default extensions.

    hi all,
    My company has recently moved over to MS Office 2007 and the default extensions for word, excel etc are now .docx, xlsx etc (ie xml based).
    Unfortunately now when we upload files through APEX to the database the MIME TYPE value for these files isn't being recognised and not loadeding correctly into the APEX_APPLICATION_FILES table and subsequently any future retrieval of these files fails.
    I could put some logic inthe up load procedure to look at the filename in APEX_APPLICATION_FILES and hard code in the releavnt mime types but this still causes problems when retrieving the content.
    Has anyone come across this and got a workround? Is it a bug in AE?
    regards
    James
    FYI - using APEX 3.0.2 over 11G.

    I have not any response to my question and not sure if it is in Apex I need to look or the tomcat server that I need to look. I have a useful application to try to show others what Apex can do for our customers to collaborate. However, most of our customers are using office 2007 so, hoping this is possible.
    I am using apex 3.2.0.00.27 if that helps someone to point me where to find more info on being able to have Word 2007 or excel 2007 fire up to open a .docx or .xlss file stored in a table blob column. Word or Excel does fire up to open .doc and .xls files.
    The following is the query for a report selecting the filenames uploaded into a blob column in my table:
    { SELECT s.ID, SUBSTR(s.NAME,INSTR(s.NAME, '/',1,1)+1,length(s.NAME)) SHORT_FNAME, s.SUBJECT
    FROM spp_attachments s
    WHERE s.PROGRAM_ID = :P2_PROGRAMID }
    Below is the stored procedure called from the link on the short_fname column in report query above.
    { create or replace PROCEDURE  download_file(p_file IN number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    APEX_APPLICATION.G_FLOW_ID :=245;
    IF NOT (wwv_flow_custom_auth_std.is_session_valid) then
    owa_util.status_line(404, 'Page Not Found',true);
    return;
    else
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM spp_attachments
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'),
    FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment;
    filename="'||replace(REPLACE(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),NULL),chr(13),NULL)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end if;
    end download_file; }
    Thank you,
    Mark

  • Firefox is adding a .part extension to my downloads and they won't open. Why?? Fix???

    When I download a file, Firefox does 2 things: changes the file name to gobbledy-gook of letters and numbers, AND, adds a .part extension -- therefore the files won't open. This is a NEW problem. If I manually remove the .part extension in the download folder, the file will open, but I still have the problem of the name change. I believe that the .part extension is supposed to go away when the download is finished, but that does not happen. Also, my downloads always used to come with their original name, not a numbers/letters name. Thoughts?

    Hi Mitchina, which problem do you have -- the .part file not being renamed to the final correct name, or a different problem?
    Did you try turning off the scanWhenDone setting? For clarity, here are the steps in full:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the filter box, type or paste '''scan''' and pause while the list is filtered
    (3) Double-click '''browser.download.manager.scanWhenDone''' to toggle its value from true to false.
    ''What this does: Normally Firefox submits the file to your AV software for an on-demand scan. Toggling this setting turns that off. It also prevents Firefox from adding a notation to the file that the source of the file was the internet. That may change how Windows treats the file. You should turn your real-time AV scanning back on when you have this feature turned off.''
    If that doesn't help, there could be a permissions problem with the download folder, or another issue that doesn't come immediately to mind, but we need more information from you.

  • How to set default file path while downloading alv output

    Hi,
    Can anyone tell me that how to set default file path while downloading the ALV output to system using Local file button on tool bar.
    Please look below screenshots:
    Kindly help me resolve it.
    Thanks in advance.
    Regards,
    Ashutosh Katara

    This information initial value is (maybe) stored in Windows Register (register.exe) at Software\SAP\SAPGUI Front\SAP Frontend Server\Filetransfer -> PathDownload, you can read it thru class CL_GUI_FRONTEND_SERVICES method GET_UPLOAD_DOWNLOAD_PATH and update it thru method REGISTRY_SET_VALUE. (Else there may be some parameter ID to force data, but I'm no longer sure)
    Regards,
    Raymond

  • Default extension of source file in sql loader map

    Hi
    I created a map having a flat file as source. The file name is X. When Ran the map, these was error message said that 'Cannot find file X.dat'
    Is the '.dat' a default extension when no extension is defined?
    Thank you
    Sozy

    >
    Is the '.dat' a default extension when no extension is defined?
    Yes

  • Oracle XBRL Extension Ready for Download

    Oracle XBRL Extension Ready for Download
    URL: http://www.liberidu.com/blog/?p=2608
    The new ready to download Oracle XBRL Extension is a “no cost option” on top of the latest Oracle Database 11.2.0.2.0 release. With this added functionality you will get a database environment that contains One or more back-end XBRL repositories based on Oracle Database, which provide XBRL storage and query-ability with a set of XBRL-specific services An external XBRL processing engine (XPE)
    The XBRL Extension to Oracle XML DB integrates easily with Oracle Business Intelligence Suite Enterprise Edition (OBIEE) for analytics and with interactive development environments (IDEs) and design tools for creating and editing XBRL taxonomies.

    For Brian:
    What was it you wanted to announce:
    the availability if the release 2 or the fact that OEM 2.2 makes 8.1.7 inaccessible?
    thanks much

  • Double Extension Added to Downloaded Files

    I am trying to download a QIF file for Quicken and on completion of download the extension appears at download.qif.txt. When I remove the .txt extension leaving just the .qif extension the file type changes to quicktime. Checking Quicktime I do not see QIF as a type of file extension approved. Any suggestions on how to get to work. I can download other QIF files but this one site is causing issues. I tried down loading to a PC and emailing the file however the files shows up as text in the email and not as an attachment. I tried installing the 10.4.7 combo suggested in a previous post but no luck.
    Regards.

    What is happening - when you first start capturing, the Mac OS is instructed by FCP to allocate disk space for the capture. If you have not set capture limits in the preferences, it allocates almost all the hard disk, and gives it a temporary file extension of .av. When the capture successfully completes, with the video recorded to some of that space, the system renames the space used by the video to the capture file name, typically filename.mov. It then frees up the unused space in the .av file.
    If you fail to complete the capture successfully, by force quitting FCP, the end cleanup never takes place, and the .av file remains filling up the disk. If you try the capture again, it will fail due to no free disk space. To recover, delete the .av file from the finder, and restart FCP. Better yet, reboot and restart FCP.

  • Downloading Images - FileReference download error 2176

    Hi everyone.
    I'm trying to download some images but getting this error "Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press."
    The trouble is, it IS running off a button click - just indirectly.
    I'm trying to design a good architecture for my program, so have the Application, a dataStore and some value objects, for example, a pricebook containing and array of products, each called PricebookVO and ProductVO.
    What I'm doing when the application loads is doing a database query with another API that gives me a pricebook and all of its products, and i populate the value objects.  Relationship is obviously  PricebookVO -< ProductVO.  I wanted to download the images for the products at the same time but it won't let me due to the error above, so what I have now is a button bar and when the user clicks a button an event is bubbled up to the Application which changes the page, but what also happens is it checks to see if the user has clicked the Products button and if it has, it tells the PricebookVO to tell each of its ProductVO's to download their image (from a URL that was saved from the query.
    Presumably the error im getting now is because the download is not directly summoned by a user event but by an indirect event (ie user pushes button, code calls code which tries to download the file).  How can I download the images and still maintain my architecture?
    Also, am I getting confused?  I want to get a file from a server and save them in an mx.controls.Image on the ProductVO record, do I use the FileReference.Download method or something else?  Because on further inspection it looks as though the download method is for downloading something to the local machine with a download dialog box?
    Thanks
    Steven

    Thanks for all your help Peter, its much appreciated.  I hate that useless feeling when learning a new language!
    So anyway, I was initially using image.source but thought to myself that's probably referencing the image from its server source which might be quite a hog, so wanted to store it myself, but if you say image.source does indeed handle the image itself and not just reference it from the source, thats good.
    My only remaining query is regarding how it is displaying.  I have a tileList which is rendering the images and it does work, however the images are loading on screen as I watch them, and if I scroll I then have to wait again whilst the images load.  If I then scroll back to the previuos part of the screen, where the images had previously already loaded, they have disappeared again and I once again have to wait for them to load.
    I know normally you'd embed them, but dont see how thats possible with the way I'm having to load them from the server?
    I have a method in my datastore like this:
    public function getProds():ArrayCollection{
    var imgs : ArrayCollection = new ArrayCollection();
    for each (var pb : PricebookVO in pricebooks){
      pb.getProdCount();
      for each (var p2 : ProductVO in pb.products){
       imgs.addItem(p2);
    return imgs;
    and in my products page:
    <mx:TileList>
      <mx:width>100%</mx:width>
      <mx:height>100%</mx:height>
      <mx:itemRenderer>components.Thumbnail</mx:itemRenderer>
      <mx:dataProvider>{DataStore.getInstance().getProds()}</mx:dataProvider>
    </mx:TileList>
    components.Thumbmail is
    <mx:Image>
      <mx:width>100</mx:width>
      <mx:height>75</mx:height>
      <mx:source>{this.data.image.source}</mx:source>
      <mx:toolTip>{this.data.prodCode}</mx:toolTip>
    </mx:Image>
    So, how can I stop the tilelist from having to constantly reload the images?  I get the impression that the solution might end up using a lot of memory to store the images somehow, so advice on the best way to do this is appreciated.
    Thanks!

  • Download (método FileReference.download)

    Hello!
    I am writing from Colombia, so I hope forgive me for my
    English so basic and aid translator.
    My question is this:
    I need to use the method: download (FileReference.download
    method)
    to be updated a number of flv I have a computer but the
    disadvantage is that the customer asked me that was so hidden
    without participation of a user with keyboard or mouse, you can
    perform this task?
    Thanks

    you can't force a download on a user without their active
    participation (using some kind of interface device like a
    keyboard/mouse/joystick/etc).

  • FileReference.download Failing

    I'm trying to use FileReference.download for a user to
    download a file. (obviously)
    It's working just fine, for probably 99% of our users.
    However, for one user in particular, the "Save As..." dialog box
    never appears. Does anybody know of any firewall/anit-virus/other
    security settings that could block this? It's happening in FF 2.0
    and IE 6, with Flash Player 9.

    Have the one user use another machine in their location to
    see if it is consistent inside their network or the user's machine.
    Also have them right click over the app to be sure they have
    the correct version of the Flash player.

  • FileReference.download in linux

    Hi All
         I am developing an application to use in both linux(ubuntu) and windows.
         In that i am using FileReference.download to save the file locally in windows but this is not working in linux.
         Is there any other possibilities(method) to save the file locally in both linux and windows?
         Please someone help me..
    Regards
    Preethee L

    Hi Preethee,
    Can you post the code snippent used in the application for saving the file
    I have tried following code on my Linux box (Ubuntu 10.10) and its working fine. This saves the file in documents folder of the user machine
                    var f = new FileReference();
                    try {
                        f.download ( new URLRequest ( "http://servername/download.text" ), "foo.txt" );
                    catch (e:Error)
    thanks
    Ashish

Maybe you are looking for

  • Synonyms on Adobe Bridge CS4

    Hi everybody Would I like to know if it is possible to set up a list of synonyms in the keywords of Adobe Bridge CS4? And if so, how? And so not, what can I do? Thanks, iPee.

  • R3 AR aging report with partial payment need FBL5N

    Hi, does anyone have AR aging report list NET BALANCE for each invoice for AR Aging report?  I tried FBL5N which did not apply partial payment to each invoice, customer would not want to see this kind of report and we did in Excel for all open invoic

  • How do you open a multi page tif be opened in Photoshop?

    I have an embedded tif with a render, shadow layers and other channels in one tif. (Not created in Photoshop) I thought it was multilayered tif, but I think it's called a multi page tif. When I open it in Photoshop it opens the top layer/page, and no

  • Office 2007 Virtualization - Word Issues

    Hello, I am trying to virtualize Office 2007. I have been installing each application separately and then create the virtual app. Excel and PowerPoint work fine however, with Word I get a message at startup saying the Office is installing or configur

  • SERVER_NAME issues !!

    Our configuration includes : Netscape Suitespot as the proxy server and WebLogic 5.1 as the app server. When calling from the ServletRequest object the getServerName method, it returns the name of the server from the URL and not from the standard CGI