Setting the file type in a file field

Hi,
I wonder if any body can help i am new to web application
development, I am developing an asp application in dreamweaver 8,
A few of my pages contain a file field which has a file
browse button at the end of the field which works fine,
now i want to set the default file type to *.pdf, Currently
when i run my app in IE 7, when i click on the file browse
button, the file browse dialog box appears but the default
file type is *.* (All files), is it possible to set the default
file type
to pdf so that when the file browse dialog is displayed the
default file type is *.pdf in stead of *.*.
Thanks
Fifo

The OS just watch the extension of the file.Not always. If you create a word doc but name it with
some other extension, the OS still can determine that
it is a word doc.On which OS?
if i take foo.exe and i rename foo.doc so my OSwill
try to open it as a MS Word Document.Again, garbage in, garbage out.What you mean?
If I create a MS Word Document for a file .doc that is not a real .doc and it is not able to read, i will just lose cpu time and a lot of memory.
So it is important to understand if I need really to open MS Word watching what is the real file type
Either way, you're going to be doing way too much
work (and wheel-reinventing) if you're going to build
your own detection scheme.In the SDK there is not any file type checker, and if eventually really exists an OS like you say that is able to read inside the file, i prefer to have my own Java class that do that work in a safe and opensource way.
However in my first post i've given a site with some java code that do what I need, i just was asking if anyone know if there is any ready-to-work java class that is better for doing this work.

Similar Messages

  • CS4 Set default file type when placing file

    The File->Place dialog box has a default file type of 'Importable files.'  Is it possible to set the default to All files (or anything else)?  Making the change manually does not seem to stick.  I have the same general question regarding File->Open.  A search of the forums returned one hit (unanswered) in the Dreamweaver forum.
    Thank you.
    Dick Conrad

    Peter:
    Good question.  One of our editors made this request, and I believe that he works with files that lack extensions.  But controlling the default would also let us go in the other direction: quickly see only .rtf or .txt files, for example.
    Any trick would be impractical if it lived in InDesign Defaults.  All ID users get the same copy, and no two editors would want the same filter.
    Thanks for your response.
    Dick Conrad

  • How should i set the baseURI when a db file path with a space

    if the db file in a path like c:\program file\myapplication,then i set the baseURI dbxml:c:\program file\myapplication ,some exception occur~what should i do ?
    thanks a lot

    The Base URI needs to be a valid URI, which means it cannot include the Windows '\' character at all. In your case, you should be fine using something along the lines of "file:////C:/program file/myapplication"
    (give or take a '/' or two -- I haven't tested this).
    It's a common for BDB XML users to confuse the argument to create/openContainer() (a filesystem path) with the Base URI (a URI). The meanings and requirements are different. The best thing to do is to set and use a container alias (XmlContainer::addAlias()) to use in your queries.
    Regards,
    George

  • How do I set the content type ?

    Hi
    I have to upload a file from my Java Application to a remote servlet.
    I have used the HTTPConnection class to connect to the remote servlet and made it call the POST method explicitly.
    How do I set the content type of the file I am uploading from my Java apllication?
    I tried to change the content type in the doPost method. by giving
    req.setContentType("multipart/form-data"); in the doPost.
    It still doesnt work..
    Is there any way to set the content type in the Java application?
    Thanks in advance

    What class is your req variable? If your using a HttpServletRequest, then there is no method req.setContentType("");
    In the HttpServletResponse this is for telling the web browser or receving medium what kind of mime type to expect.
    And what package is the HttpConnection class from?
    I think more precise info is required before this question can be answered.

  • Setting the content type inside the ABAP mapping.

    Hello All,
    Can any one help me by telling me how to set the content-type inside ABAP mapping. I have searched a large no of blogs and help.sap.com for the same.
    My requirement is I want to change the MIME type of the Main Document in side SXMB_MONI so that can change the content type of Main document which is application\xml by default.
    I would appreciate an early response regarding the same.
    Abinash

    Hello Raj,
    The output of my ABAP mapping is a flat file. So when I try to open the file with content type application/xml in the message monitor it shows the file has some error which is natural. The way to get around this problem is change the content type to application\txt from application\xml.
    I am not finding an option to set the content type inside the ABAP mapping for the same.
    Abinash

  • Limiting file types seen in file open

    How can I limit the file types displayed under file open?
    For example, in Word, 99% of the time I would like to see and select from .doc files only. But instead I have to plunge through vast stretches of grayed out .xls, .rtf, txt, tif, etc. files to find what I need. If the operating system knows to gray them out, isn't some way to make the same files invisible?

    Not sure if there is such an available setting but how about placing all your Word files in a created folder named Word Files within your Documents folder. This was when using File > Open and navigating to the Word Files folder that contains all of your Word files, this is all you will see. You can create additional folders to sort Word files by selected category, etc.
    I do the same with Word, Excel and PowerPoint files - having a dedicated folder for each within my Documents folder instead of dumping all documents in the Documents folder only regardless of type.

  • How can i change a pdf file type to another file type

    how can i change a pdf file type to another file type

    You can copy the contents and paste it into a Word file. Just don't expect everything to transfer or to retain all of the formatting.

  • How to set the Background Color of a Text Field in a Tabular Report.

    Hello,
    I tried to set the Background Color of a Text Field in a Tabular Report.
    But I was not able to change this colur.
    In the report attributes --> column attributes
    I tried already:
    1. Column Formating -- >CSS Style (bgcolor: red)
    2. Tabular Form Element --> Element Attributes (bgcolor: red)
    but nothing worked.
    Can anybody help me?
    I Use Oracle Apex 2.2.1 on 10gR2
    thank you in advance.
    Oliver

    in "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
    style="background-color:red;"
    I will also check if there is a way to do this via the template and post here again
    edit:
    in your template definition, above the template, enter the following:
    < STYLE TYPE="text/css" >
    .class INPUT {background-color:red;}
    < /STYLE >
    (remove the spaces after the < and before the >)
    change "class" to the class that the template is calling
    (I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
    A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
    Message was edited by:
    TheJosh

  • How to get File type icon for files store on Amazons3

    Hi,
    i want to know about how to get file type icons for files that we store on Amazons3.i am a devloper ,i want to make gui for accessing amazons3.
    so ,i want to know about how to get file type icons for files that we store on Amazons3.
    thanx in advance.

    hi,
    have u heard amazon simple storage service,that provides storage space for
    storing files, i am a devloper,i want to know the files that we store on amazon,how we can get file type icon for that files.
    i want to sample code in java for this.
    thanx in advance.

  • Cfhttp and setting the content-type for a request

    Hi,
    I am trying to set the content-type for a cfhttp request like this (on coldfusion 9):
    <cfhttp redirect="no" method="get" timeout="120" url="http://10.0.0.1/test2.cfm">
        <cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
    </cfhttp>
    // coding on test2.cfm:
    <cfset x = GetHttpRequestData()>
    <cfdump var=#x#>
    // Output on test2.cfm
    content
    [empty string]
    headers
    struct
    Accept-Encoding
    deflate, gzip, x-gzip, compress, x-compress
    Connection
    TE
    Host
    10.0.0.1:80
    Proxy-Connection
    close
    TE
    trailers, deflate, gzip, compress
    User-Agent
    ColdFusion
    X-REWRITE-URL
    http://10.0.0.1:80/test2.cfm
    method
    GET
    protocol
    HTTP/1.1
    As you can see no content-type is send through. I also tried the sniffer.exe:
    GET http://10.0.0.1:80/test2.cfm HTTP/1.1
    Host: 127.0.0.1
    Proxy-Connection: close
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: ColdFusion
    Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
    Here you can also see that no content-type was passed through. The sniffer should report back
    GET http://10.0.0.1:80/test2.cfm HTTP/1.1
    Host: 127.0.0.1
    Proxy-Connection: close
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: ColdFusion
    Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
    Content-Type: application/json; charset=utf-8
    But is does not, what do i need todo to set the content-type in a cfhttp request.
    Kind regards,
    Nebu

    12Robots - are you sure about your statement that GET method requests cannot have Content-Type headers?  I don't think that that is correct.  I've always thought that it was valid (maybe unusual, but ...) and this W3C link weems to agree, especially in the context of its comment about what Content-Type means in a HEAD method request: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    The big problem with trying to get around the CFHTTP limitation by using the CGI scope is that the dash is illegal in a CF varname.
    There is a custom tag called CFHTTP5 that getsaround a lot of the CFHTTP limitations, including cookie preservation across multiple requests.  I haven't used it for a long time (CF5), but it is still actively developed.  Costs $50 - http://www.cftagstore.com/tags/cfxhttp5.cfm
    -reed

  • How to set the Paper TYPE?

    We have HP Multifunction printers here at work, example the HP Laserjet 4345 MFP.
    In Output Designer I have no problem setting the Presentment Target, almost always just set it to HP Laserjet 8000/8000N (PCL5).
    My problem is that I can control the tray but I can't set the paper type.
    My scenario is that the printer is defined at the printer to have Paper Type of 'Label' in Tray 2, and 'Plain' in Tray 3.
    When Jetform sends the job to the printer to Tray 2 it does not print on tray 2 because the Paper Type is set to 'Label' and then gets sent to Tray 3 instead.  The Jetform job in this case is a 8 1/2 x 11 label design, really intended for that Tray 2 'Label' Paper type.  It's important because when you set the Paper Type as 'Label' on the printer it mechanically slows things down and changes heat from what I've been told and handles label paper better vs. the 'Plain' settings.  The result is less paper jams.
    So...Can anyone tell me how to pass into the job paper type?  Paper Size and Input Tray, are the 2 options I see under Format Page and neither really address Paper Type.
    Thanks,
    Bill

    I'm surprised that nobody has any ideas on this topic!?  This is a major drawback or seems to be.
    FYI -  This is printing from an HP-UX 11.23 Itanium based Unix system.

  • Using Forms that don't set the content type charset

    The Servlet API 2.3 has a new method, request.setCharacterEncoding(), to
              deal with the fact that almost no browsers set the content type. When I call
              this method passing "Shift_JIS" using weblogic 6.1, it works fine when the
              content type is not set by the browser. That is, after calling
              setCharacterEncoding when I call request.getParameter("testparam") I get the
              correct translated value. However, if the content type is
              "application/x-www-form-urlencoded; charset=Shift_JIS" and I call
              request.setCharacterEncoding("Shift_JIS"), getParameter("testparam") returns
              null.
              Can anyone shed some light on this?
              It looks like I'll have to not set the character encoding if it is already
              set. That, of course, opens the possibility that the character set used for
              translation is different than was used in the form.
              Russ Cole
              [email protected]
              

    It might not be the new 3G network. Though I've heard the major metropolitan cities can have slower responses due to congestion.
    Have you upgraded to the new operating system? Have you tried resetting your phone? You can do that by holding the "Home" and "Power" buttons down together, through the shut down screen and until the apple appears on the screen.
    You might also try this:
    http://www.roughlydrafted.com/2010/07/07/how-to-speed-up-your-iphone-3g-running- ios4/
    It's called a cold reboot.
    Sharon

  • How can I set the font size of a form field in the fdf file?

    I need to dynamically set the font size of a field to accommodate text of varying length, automatic font size won't work in this case. It seems like this can be done in the FDF but I have tried several variants without success. Could someone help out with a real example of what the syntax in the fdf should look like.
    I am using Acrobat Professional 8.1 but the created fdf will need to work with Reader also.

    I think that the font size has to be set in the form itself, not the FDF.

  • Setting name and type on save-file...

    Hi !
    New to this board, hope you will excuse me if i�m asking something stupid :-)
    I�m pretty new to JAVA, and at the moment I need to modify some code, so that it will dynamically preset the name and file-type when the user chooses to save. I'ts a small bit of code that uses different JPEG-pics, and I need to get the name of the current pic+ a type on every save. I think I have the saving part fixed, but need someway to set the name for every save..
    Thanks in advance, sincerely
    Ramzez

    Look at the JFileChooser API. Feed it with an appropriate FileFilter implementation and a default name (setSelectedFile(File f)).

  • Setting the name of streamed zip file

    Hi,
    I have a servlet which creates a zip file with documents retrieved from a database. To create the zip file I am using the ZipOutputStream class and adding the documents one at a time to this object. This is all working fine.
    The problem I have is pretty simple, in that I can't seem to find a way in which to set the name of the zip file. This must be possible! At the moment it appears to be setting the name of the zip file to the name of the class that created it. In this case my class is called DocumentPacker and what comes back from the servlet is a zip file called DocumentPacker.zip. This wouldn't be so bad, but if you're creating the zip file for a user that does not have cookies enabled, it appends the session id to the end of the zip file name which i don't want.
    I am creating my ZipOutputStream like this:
    ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream(response.getOutputStream()));
    and then adding the documents one at a time using a BufferedInputStream.).
    Any help on how to set the name would be much appreciated
    Thanks
    Claire

    Your servlet must set some headers on the HTTP response (Content-Type as "application/zip", Content-Disposition as "attachment; filename=yourfilename.zip")
    Read the RFC1806 document.
    Content-Type: application/zip
    Content-Disposition: attachment; filename=genome.jpeg

Maybe you are looking for

  • Is it possible to process audio tracks with compression, eq, etc....in Logic Express, similar to the way you can do it in Protools?  If so, how do you do it?

    Is it possible to process audio tracks with compression, eq, etc....in Logic Express, similar to the way you can do it in Protools?  If so, how do you do it?

  • My socket gets tired!

    Do "lazy sockets" exist? :-p I've got a problem with one... In a client-server application, the client connects to the server, the server accepts, and sends a very long string to the client (about 900k characters). the server does like this: PrintWri

  • My DVD drive won't open when I click the button

    Hi there I'm hoping someone can help me. My DVD drive won't open when I click the button. I've tried clicking on eject on the DVD Drive icon in My Computers and it comes up with an error message. I think I deleted cookies the other day. Could that ha

  • Flash Files to Dreamweaver

    Hey All- I did my basic background templater in flash, and i want to bring it into dreamweaver to finish my site. But when i hit the Flash icon in DW, and insert the file, it doesnt read right. I get a little grey box with the F in it, and a black bo

  • MacのPhotoshop CCとBridge CCのアップデートができません

    Mac OS X 10.8.5 [Photoshop] Photoshop CC 2014.02.25現在のバージョン14.0から最新バージョン(14.2?)にアップデートしようとしています. Photoshopの「ヘルプ」メニューの「アップデート..」はグレーアウトしてクリックできません. Creative Cloudアプリでは「最新」の表示になっています. Photoshopをアンインストールして再インストールしても14.0がインストールされます. [Bridge] Bridge CC 20