File download - file name with spaces

I use the resp.setHeader("Content-disposition", "attachment; filename="+filename) method. it works. However, when the file name contains spaces the dowloaded file's name is only the part of the string up to the space, nothing more. Is there a way to deal with it? I'm replacing spaces for '_' at the moment but that's not exactly what I want.
Thanks.

Is the filename put in between quotes?
resp.setHeader("Content-disposition", "attachment; filename=\"" + filename + "\"")

Similar Messages

  • Why does iPhoto (9.0/11) not retain the Event name when exporting more than one event? (using File - Export - Album name with number).

    Why does iPhoto (9.0/11) not retain the Event name when exporting more than one event? (using File -> Export -> Album name with number).
    Exporting a single Event retains the Event name which is what I'd expect. But highlighting more than one event and exporting it renames the images to Events 001.JPG, Event 002.JPG etc.
    I was recently on holidays and had all my events nicely split on Dad's computer but when I went to export it I couldn't retain any of this information. Now I have to replicate this all again on my computer.
    It wasn't possible to export the entire library as the external drive was fat32 format an I didn't want all of it. It would be nice to export a bunch of events to someone and have it retain the name.
    Does anyone have a work around or will this be fixed at some point by Apple?

    Why does iPhoto (9.0/11) not retain the Event name when exporting more than one event? (using File -> Export -> Album name with number).
    Exporting a single Event retains the Event name which is what I'd expect. But highlighting more than one event and exporting it renames the images to Events 001.JPG, Event 002.JPG etc.
    I was recently on holidays and had all my events nicely split on Dad's computer but when I went to export it I couldn't retain any of this information. Now I have to replicate this all again on my computer.
    It wasn't possible to export the entire library as the external drive was fat32 format an I didn't want all of it. It would be nice to export a bunch of events to someone and have it retain the name.
    Does anyone have a work around or will this be fixed at some point by Apple?

  • I need some information about File Download & File Upload

    Hi  All,
    Can any one help me on this, I need some information about File Download & File Upload.
    I read tutorial abt file upload and download but some of methods in tutorial are deprecated so i need clear information abt File upload and Download, if possible Code examples.
    Thanks
    Ragards
    Ravi Golla

    Hi Ravi
    Check out thses links for examples:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
    /docs/DOC-8661#22 [original link is broken]
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
    Otherwise you can simply follow this code for file download
    Use the code like this.
    1) Create the button and bind the action for it.
    2)then write this code in the action.
    3) do not write any thing in the init method.
    try {
    final byte[] content = this.getByteArrayFromResourcePath("C:
    xyz.properties");
    final IWDCachedWebResource resource = WDWebResource.getWebResource(content, WDWebResourceType.UNKNOWN);
    try {
    final IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "WD_Filedownload", false);
    window.open();
    catch(Exception e)
    wdComponentAPI.getMessageManager().reportException(new WDNonFatalException(e), false);
    5) writr the method getByteArrayFromResourcePath
    //@@begin others
    private byte[] getByteArrayFromResourcePath(String resourcePath)
    throws FileNotFoundException, IOException {
    FileInputStream in = new FileInputStream(new File(resourcePath));
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    int len;
    byte[] part = new byte[10 * 1024];
    while ((len = in.read(part)) != -1) {
    out.write(part, 0, len);
    in.close();
    return out.toByteArray();
    //end
    Similarly for file upload
    Similarly for upload in to server path also do the same
    IWDAttributeInfo attInfo =
    wdContext.getNodeInfo().getAttribute("upload");
    binaryType =
    (IWDModifiableBinaryType) attInfo.getModifiableSimpleType();
    uploadedName = binaryType.getFileName();
    File filename =new File("
    <server name>
    <folder name>
    "+uploadedName ); );
    try {
    FileOutputStream out = new FileOutputStream(filename);
    out.write(b);
    out.close();
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();

  • SQL Query not working for column names with spaces

    Hi People..
    We have a strange situation wherein, the column name in the database table has a space inbetween like "Constant Name". While we write a JDBC statement code with the select query we get an exception for invalid syntax. It will help us in a great way if you have anything to inform us on this..
    Thanks
    Prabz

    Using case sensitive names and names with spaces in it is not a good practice.
    However, I believe the SQL standard accounts for this with quoted identifiers. I believe the syntax is
    . select "My Field1", "My Field2"
    . from "My Table'
    Have also seen the following although it might be MS Access specific.
    . select [My Field1], [My Field2]
    . from [My Table]

  • Document library: File name with spaces at EOF

    I noticed a strange issue with uploading files with space at end of file (example "ABC  .xlsx"). Such files are allowed to be uploaded for the first time but when the end user (with contribute permission) tries to upload the same file again
    (overwrite) then it uploads the file and goes to the next dialog box where properties for the form is collected (EditForm) and then when user tries to hit save, he gets "Sorry this site is not shared with you" error. The owners (with Full control
    permission) get the error message that the file needs to be renamed. 
    This does not happen with files having proper names. The files are automatically overwritten as expected.
    Is it a SharePoint bug or am I missing something ?

    Hi Prakash,
    When we upload a document which contains spaces at the end of the file name, then SharePoint will trim out the spaces in the Edit Item Form, so the name for this document should be “ABC.xlsx”.
    When we re-upload the document to SharePoint, because of that extra space it sees the filename(ABC  .xlsx) as different to the existing document (ABC.xlsx) so it adds it as a new document.
    And in the edit item form, the space has been trimmed out. Because there is already a document with that filename in the document library, it throws the error.
    So this issue is by design that SharePoint uploads the document first and then edit the properties of the document.
    For more details, please refer to the link below:
    https://discoverlars.wordpress.com/2012/10/27/sharepoint-doesnt-overwrite-a-document-with-the-same-name-but-creates-duplicates/
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • Field names with spaces in target file using fcc

    Hello Friends,
    My target structure fields:
    MT_Target
    ItemNo, ItemName, ItemQuantity, AmountValue, TotalAmount
    My requirement here is - In the target file - these fields should be generated with space. Shown as below:
    Item No, Item Name, Item Quantity, Amount Value, Total Amount
    How can i achieve this.
    Thanx
    S.

    if i understood u correctly u want to have a header line in ut target file same as that ur field names but with a space in between??
    if yes  the use :
    NameA.addHeaderLine=3
    NameA.headerLine =Item No, Item Name, Item Quantity, Amount Value, Total Amount
    http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm

  • File name with spaces

    Hi,
      I am unable to upload files with file name having blank spaces to cFolders 4.0.
    Kindly help me to resolve this issue.
    Regards,
    Shynu John

    Hi Shynu,
    Please refer the following note.
    Note 959280 - File names with special characters are uploaded incorrectly.
    Regards,
    Pavan

  • QT v10.0 "save for web" creates file names with spaces?

    I find it strange that the additional exported files from "save for web" (iPhone, etc) auto exports files with spaces in the file names. Not only that, but changing the file names breaks the javascript.
    I work on a server that denies permission to files with spaces in the file names. I know it's a bit archaic - but it's also a long standing tennent of "good HTML" to creates files with a hyphen or underscore instead of a space.
    Is this something that can be addressed in the next update?

    If your using cs5 or cs6 you might try Image Processor Pro which seems to use underscores
    and has a save for web option.
    Dr Browns Services 2.31
    http://www.russellbrown.com/scripts.html

  • Al11 file name with spaces

    Hello all
    I'm trying to create file on server that have spaces, but name is being cut. For example instead of creating file '/usr/tmp/file name.txt'  I'm getting  '/ust/tmp/file'. Does anybody know what cause this and how to resolve this problem?

    REPORT  ZB_TEST4.
    start-of-selection.
    OPEN DATASET '/tmp/File1 name.txt'.
    TRANSFER 'some data' TO '/tmp/File1 name.txt'.
    CLOSE DATASET '/tmp/File1 name.txt'.
    WRITE 'end'.

  • PL SQL File  Download - file name shows up as procedure name?

    Hello,
    I have been following the article below to create a download link to my db blobs, however when downloading the files, the file name appears as the procedure name as opposed to the desired file name.
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10497/up_dn_files.htm#CIHDDJGF
    any ideas why this is happening?
    Thanks,
    J

    I've been having this exact problem all morning and I haven't found a workaround yet. The example posted by ptjurley doesn't quite clarify it for me. I am trying to play a video located in a table using an embedded windows media player. I'm working off these instructions: http://iadvise.blogspot.com/2007/10/apex-implementing-video-on-your-apex.html
    This is the code for the otherwise blank HTML region on the page:
    <object id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
    <param name="filename" value="#OWNER#.download_video_file?p_file_id=935">
    <param name="Showcontrols" value="True">
    <param name="autoStart" value="True">
    <embed type="application/x-mplayer2" src="#OWNER#.download_video_file?p_file_id=935" name="MediaPlayer" width=720 height=540></embed>
    </object>
    Even when the filename and embed source is left blank like this: <param name="filename" value=""> I get the same error when trying to load the page. How exactly was this problem fixed, if it was resolved? I assume it's something to do with APEX not recognizing that #OWNER# is a variable within the HTML region, but I could be wrong.
    Also, the code for my procedure differs from the example given in the above link, since APEX didn't like the way it was written. This is the download_video_file procedure I am trying to run:
    create or replace PROCEDURE download_video_file(p_file_id IN HOMEPAGE_PHOTOS.id%TYPE) as
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT blob_content, mime_type, dbms_lob.getlength(blob_content) file_length, name
    INTO Lob_loc,v_mime,v_length,v_file_name
    FROM HOMEPAGE_PHOTOS
    WHERE id = p_file_id;
    owa_util.mime_header(v_mime, FALSE);
    htp.p('Content-length: '||v_length);
    htp.p('Content-Disposition: attachment;
    filename="'||replace(replace(substr(v_file_name,instr(v_file_name, '/')+1),chr(10),null),chr(13),null)||'"');
    owa_util.http_header_close;
    wpg_docload.download_file(Lob_loc);
    end download_video_file;
    Edited by: user11293104 on Jun 22, 2009 12:41 PM

  • File and directory names with Danish characters

    I have installed the Novell Client v2.0 for Linux on my Open Suse 10.3. The Client is connecting to my Netware servers (6.0 & 6.5) without any problems...
    There is one problem... Filenames and directory names with the Danish , & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as b. and when clicking the file the file disappears from the file list. It seems to be the same problem with the German (umlaub).
    What to do?
    /Michael

    Originally Posted by J.H.M. Dassen (Ray)
    mimo <[email protected]> wrote:
    > There is one problem... Filenames and directory names with the Danish ,
    > & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as
    > b. and when clicking the file the file disappears from the file list. It
    > seems to be the same problem with the German (umlaub). What to do?
    As far as I know, the Novell Client for Linux expects that file and
    directory names use the UTF-8 encoding and does not support a traditional
    8-bit encoding like ISO 8859-1. Try changing the encoding of file and
    directory names to UTF-8 as described in
    SDB:Converting Files or File Names to UTF-8 Encoding - openSUSE
    HTH,
    Ray Dassen
    Technical Support Engineer, EMEA Services Center, Novell Technical Services
    Novell, Inc. Software for the Open Enterprise Software for the Open Enterprise
    Seems a good hint. When I create a folder or file from within SUSE using an "Umlaut" everything is OK and NCL 2.0 displays them correctly as they are UTF-8 formatted.
    The proposed tool is no solution: one cannot convert folders or files that one cannot see (does it work for folders at all?). Maybe a windows tool would work because one could search for all files or folders with "Umlaute" and convert them. Other options?

  • Role names with spaces (6.1 to 8.1)

    Hi All
    I'm working in an organization that has group and role names within their LDAP
    repository such that the group and role names contain spaces. Hence, for example,
    within a web.xml file lines like the following exist:
    <role-name>Some Role Name</role-name>
    This has worked without problem in Weblogic 6.1 but given some prelimanary work
    within 8.1 we are noticing that Weblogic 8.1 does not appear to like spaces within
    the <role-name> element.
    Is this just the way it is with Weblogic 8.1? Or is there a way to continue to
    use role names with embedded spaces within Weblogic 8.1?
    Thanks,
    Rob

    "Peter" <PeterB> wrote:
    >
    "Rob" <[email protected]> wrote in message
    news:3f57d329$[email protected]..
    Hi All
    I'm working in an organization that has group and role names withintheir
    LDAP
    repository such that the group and role names contain spaces. Hence,for
    example,
    within a web.xml file lines like the following exist:
    <role-name>Some Role Name</role-name>
    This has worked without problem in Weblogic 6.1 but given some prelimanarywork
    within 8.1 we are noticing that Weblogic 8.1 does not appear to likespaces within
    the <role-name> element.
    Sounds like a bug. File a support case.
    Hi,
    A workaround exists :
    1 - in web.xml, update your role-name element by replacing spaces with "_"
    2 - in weblogic.xml, add :
    <security-role-assignment>
         <role-name>Some_Role_Name</role-name>
         <principal-name>Some Role Name</principal-name>
         </security-role-assignment>
    Regards
    Christophe

  • Independent Servers?: Publishing and page names with spaces

    Hello I am hoping someone who has published their site to server independent of .mac could tell me how they managed to name their pages with spaces without publishing problems. I have read here that you have to use an underscore or something similar to name your pages....Eck....I am making a site for my mother's business and I would prefer to use page names like 'about our service' instead of 'aboutourservice'. And I have seen that some people have managed this. Can any kind souls help?
    Thanks!

    DJ.... I publish my site to FOLDER first, then upload
    it to my server using FETCH FTP. It loads fine and
    doesn't have trouble with the menu spaces and such.
    Not sure what everyone else is saying about that, but
    it's not an issue. I use .Mac for my podcasts, and
    iWeb at DreamHost for my internet site.
    Jim -- what's your url? I'm wondering if there are some hosts which automatically replace spaces in uploaded files. Normally you just can't upload them. Or maybe Fetch is doing it for you. Would be useful to know.

  • Bug in the copy cluster roles wizard - CSV reparse points cannot have names with spaces

    Hi All,
    I have identified a bug in the copy cluster roles wizard in 2012 R2, which is preventing me from migrating my clusters from 2008 R2 & 2012 to 2012 R2.
    The bug surfaces when you attempt to copy a VM role from a 2008 R2 or 2012 cluster that has a CSV reparse point name that contains spaces as follows:
    The role appears to copy across fine, but once you've migrated the CSV and brought it online followed by starting the VM, the VM configuration resource promptly fails along with the VM.
    The issue can be spotted inside the copy cluster roles wizard, where it presents itself by removing all text after the first space in the name to read "C:\ClusterStorage\CSV" rather than "C:\ClusterStorage\CSV
    Test Disk 3" as follows:
    The bug only appears for VMs on CSVs with a reparse point name containing spaces - all other scenarios succeed.
    After searching through the registry on the new cluster, you can clearly see that the VM role hasn't been correctly copied.
    It shows a value called SharedVolumeMappings with the data C:\ClusterStorage\CSV|<guid>|<integer>
    Whereas it should show the data C:\ClusterStorage\CSV Test Disk 3|<guid>|<integer>
    If you modify the data in the SharedVolumeMappings value in both
    0.Cluster\Resources\<VM guid> and Cluster\Resources\<VM guid> keys, the VM will start and work correctly.
    The problem for me is that I have many VMs on many different CSVs all with spaces in the names of the reparse point! Its not feasible for me to go through the registry for every copied VM on every node of the new cluster, as this would take a very long time
    and would be prone to errors that could cause further problems.
    Can anyone provide any help on this? A hotfix for the issue would be great, if anyone from Microsoft is reading :-)
    My deadline to get the VMs migrated to the new cluster is the 21st February, so I would really like to have a solution to the problem before then if at all possible.
    Many thanks in advance,
    Tom

    Hi Subhasish,
    Thanks for the reply, glad that its something that is reproducible!
    Do you have any idea of timescale? Or is it likely that I will have to modify the registry as above to get this working?
    If I am going to have to modify the registry, please can you let me know if the resolution I have tested above is safe and viable? Or are there other settings that I will need to change to make the cluster fully aware of the proper path to the CSVs for its
    VMs?
    Also, is there a known procedure for renaming the reparse point whilst VMs are running on it? This would allow me to negate the issue before copying the roles to the new cluster :-)
    Thanks again,
    Tom

  • Handling property name with spaces in SQL query

    Hello,
    I have some JSON that looks like this:
        "SystemId": "112234",
        "Parameter": {
            "Total Hours": [
                    "timestamp": "2015-03-15T15:20:00Z",
                    "itemValue": "0"
                    "timestamp": "2015-03-15T15:15:00Z",
                    "itemValue": "296"
    ..and am having trouble with the space in the "Total Hours" property name.  When executing a SQL query, I have tried to reference it as ["Total Hours"], [Total Hours], and "Total Hours", but none of these works.  I
    have also reviewed the "Querying DocumentDB" and "DocumentDB SQL Query Language" documents, but am unclear on how to escape this space.  As this is valid JSON, I would expect to be able to handle it via DocumentDB SQL query, but am
    not certain what I am missing.  
    Thanks for your help.
    Please remember to mark replies as answers if they help you.

    Given that the property with the name with the space contains an array, I attempted to query using:
     SELECT * FROM c WHERE c.Parameter.c["Total Hours"][0].timestamp = "2015-03-15T15:15:00Z" and a few other permutations, but no luck.  Did I misunderstand?
    Please remember to mark replies as answers if they help you.

Maybe you are looking for

  • Apps no longer work

    My charge was depleted to the extent that my IPhone shut down. Prior to this all apps worked fine. After charging no of my apps work. Yhe icons are all there and if I click on one it briefly flashes to the app then cuts out back to the my apps screen

  • Decimal place problem in smartforms..

    Hi All, I my smart forms i am displaying a quantity filed, but itz displaying with 3 decimal places. But i need to hide the decimal places. I try to use formating option &symbol(.N)&  but itz giving error while calling the smart forms. Plz help me...

  • Log file full of: No Control Name specified

    my oidldapd**.log full of these message every second. 2002/06/15:01:26:17 No Control Name specified 2002/06/15:01:26:17 No Control Name specified 2002/06/15:01:26:17 No Control Name specified 2002/06/15:01:26:27 No Control Name specified 2002/06/15:0

  • Transport MCD and SyncBO

    Hi, I have executed the mobile applications successfully in the development server. i wanted to move this to quality. So when i created MCD , a transport request is generated, i released it in development server and imported it into Quality server bu

  • How do i changed my security questions ?

    i have been trying for days to download a song but it tells me it needs my security questions but i dont them so i want to change them through my other email how do i do that please and thanl ypu !