Download a file from the web

Helo,
I have to download a file from the web and copy it to the file system (ex: download from http://172.26.20.22/test.csv to \\server01\teste.csv).
I must do this using only pl/sql and java sources, I have to do this calling a procedure from pl/sql and the server doesn't have any component installed.
I've built a java procedure using java to download the file, but it give-me AccessControlException when trying to download.
Can anyone tel me what permissions I should have to accomplish this? Is there any other easier way?
Thanks.

Thanks a lot! Your post was very helpfull.
I create a procedure do download the file from the web and record in a network share.
But I'm still having a problem while writing that each line in my source file generate a duplicate line in my destination one.
Can you help me with that problem to?
Thanks
My procedure is below:
create or replace procedure SP_DOWNLOAD(astr_url_orig varchar2, astr_cam_dest varchar2, astr_nome_arq_dest varchar2) is
l_pagina utl_http.html_pieces;
l_arquivo utl_file.file_type;
begin
l_pagina := utl_http.request_pieces(astr_url_orig);
l_arquivo := utl_file.fopen(astr_cam_dest, astr_nome_arq_dest, 'W');
for i in 1 .. l_pagina.count
loop
utl_file.put_nchar(l_arquivo, l_pagina(i));
dbms_output.put_line(l_pagina(i));
end loop;
utl_file.fclose(l_arquivo);
end SP_DOWNLOAD;

Similar Messages

  • When i download a file from the web i get "Anti-Virus Program not found " message. This has been happening since I change anti-virus programs for CA etrust to Sophos. How do I get Firefox to recognise my new Anti-virus program?

    every time i download a file from the web (ie. a PDF file) i get "Anti-Virus Program not found " message. This has been happening since I changed anti-virus programs for CA etrust to Sophos. How do I get Firefox to recognise my new Anti-virus program?

    That is a very good warning provided by the Download Statusbar extension. Something like that should been built into Firefox. I filed this Bug report a couple of years ago, about the lack of a warning like that. <br />
    https://bugzilla.mozilla.org/show_bug.cgi?id=480855 <br />
    I have looked everywhere that I can think of to find a list of '''IOfficeAntiVirus providers''' ''(as mentioned in the Bug report)'' that will work with Firefox, so I can't answer that for you.
    You might want to ask the developer of the Download Statusbar extension about it. He might know which AV programs are compatible with the Windows API that Firefox uses for the download scan. <br />
    http://dlstatusbar.proboards.com/index.cgi? <br />

  • Bug:Downloading pdf file from the web,file name in dialog box populates with incorrect file name

    Hi Gurus
    When downloading any pdf file from the web using adobe Reader X the file name dialog box populates with incorrect file name
    compared to the saved file name of the document downloaded.
    Clarity
    1. Download any pdf file from the web
    2. Click File, Save as note the populated File Name
    3. Compare the populated file name with the saved file name of the documant yuo are downloading.
    4. The file Name is incorrect...
    Is there any work around on this issue?Can someone please help?..
    OS:Windows7
    Reader: Adobe Reader X
    I've tried a couple of other versions and still get the same results...

    Are you downloading the file (right-click, save link as), or just opening it by clicking it?
    If the latter, then what happens is the file is loaded to the temporary internet files folder by IE and assigned a temporary name, which is then used when you're trying to save it.
    You can test this out by going to File - Document Properties before trying to save and looking at the file's location.

  • How to download a file from the web

    Say, a PDF.

    Hi!
    Your question is marked as a Firefox OS question which is Mozilla's own mobile operating system. Thanks for contacting Mozilla Support!
    It seems that PDFs cannot be downloaded from the web at this moment, however there are apps from the marketplace you can download to open already downloaded PDFs available on your microSD card.

  • Downloading a file from the web

    Hi,
    I'm trying to implement an automatic update feature in one of my applications. This is done by downloading a jar from from my web server. I've written this method to download the file, but the file it downloads it says isn't a valid archive - so there's something wrong with my download method, but I don't know what. Any ideas on what's wrong with this method? Or any other ideas on how to download the file? I don't want to use FTP as I don't want to include my username / password in the application code.
        public static void getRemoteFile(String fileName) {
            try {
                FileWriter out = new FileWriter( "new.jar", true );
                URL url = new URL(fileName);
                URLConnection ex = url.openConnection();
                BufferedReader in = new BufferedReader( new InputStreamReader( ex.getInputStream() ) );
                String inputLine = "";
                while ( ( inputLine = in.readLine() ) != null ) {
                    out.write( inputLine );
                out.close();
                in.close();
            } catch( Exception e ) {
                // do nothing
        } // end the main method

    Thanks for the replies. I created this method instead, but I keep getting this error:
    java.lang.IllegalArgumentException: URI scheme is not "file"
    Any ideas what this means?
                File file = new File( new URI("http://www.mydomain.com/test.jar") );
                InputStream fis = new FileInputStream(file); // copy target
                OutputStream fos = new FileOutputStream("new.jar"); // copy destination
                int nSize = fis.available();
                byte [] puffer = new byte[nSize];
                fis.read( puffer, 0, nSize );
                fos.write( puffer, 0, puffer.length );
                fis.close();
                fos.close();

  • Why I cannot see downloaded PDF files from the web?

    I'm getting a message: "The file could not be opened. It may be demaged or use a file format that Preview (or PDF) doesn't recognize".
    However my PDF is updated and it works with my older PDF files saved on my Mac.
    Thanks for your help.

    Back up all data.
    Triple-click the line of text below to select it, the copy the selected text to the Clipboard (command-C):
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste (command-V) into the text box that opens.
    From the folder that opens, remove any items that have the letters “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
    I've seen an unconfirmed report that the "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you might need to remove it as well, if applicable.
    Test. If you still have the issue, repeat with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again.

  • Download file from the web

    Hey,
    I'm struggling to download files from the web.
    The first approach I though of was simply opening the url in Safari, but it would just open the file, not download it.
    Then there is an application called "URL Access Scripting", but I can't figure out how it works.
    That might sound stupid, since it has only a download and an upload command, but they do not work.
    The download function asks for a file specification, what the #$^& is that?
    I tried supplying a file, but to no avail.
    For obvious reasons I can't make an alias of a not yet existing file, so what do I put in there?
    It seems file specification is a deprecated format.
    My last resort was running curl in a shell script, which works, but that feels hackish.
    Is there any good way to do this?

    Hi pepsel,
    Let's take an example. Suppose that you want to download “UltiCalc Mac 2.5” (freeware) from [this Web page|http://www.apple.com/downloads/macosx/games/utilities/ulticalcmac.html]. You can proceed as follows:
    --BEGINNING OF SCRIPT
    set theURL to "http://wsidecar.apple.com/cgi-bin/nph-reg3rdpty2.pl/product=23023&cat=25&platf orm=osx&method=sa/ulticalc_mac.zip"
    set theFile to "/Users/pierre/Desktop/My_download.zip" -- same extension as the file to download
    tell application "URL Access Scripting" to download theURL to theFile
    --END OF SCRIPT
    Of course, you should replace “pierre” with the name of your own home folder.
    Hope it can help.
    Message was edited by: Pierre L.

  • Adobe 8 - Unexpected Corrupt or incorrect file type warning when viewing a PDF file from the Web

    Hi,
    On downloading a PDF file from my web site using Adobe 8 on the client machine I expect the file to open automatically however I receive encounter the "File Download" dialog. It has the following warning message: "The file you are downloading cannot be opened by the default program. It is either corrupted or it has an incorrect file type. As a security precaution, it is recommended that you cancel the download."
    This issue did not occur within previously tested versions of Adobe Reader (e.g. Version 5.1).
    On investigating the issue I discovered the factor that results in Adobe 8 failing to open the file automatically is the Content-Type = "application/pdf; Charset=utf-8". However, if I intercept the response and alter the Content-Type to contain only "application/pdf;" the issue on Adobe 8 does not occur.
    I have even tested when the Content-Type contains an empty Charset (i.e. "application/pdf; Charset=") but this issue still occurs. In addition setting the Charset to other encodings (e.g. "ISO-LATIN-7", "iso-8859-1") the issue occurs.
    QUESTION(s):
    1. Why is it necessary for Adobe 8 when opening PDF files from the web to expect no Charset within the Content-Type?
    2. If this was not an issue within previous versions of Adobe surly this is a bug?
    Since I cannot ensure that the Response's Content-Type does not contain a Charset at all please can someone suggest either a work-around or more importantly a solution to the issue?
    Please Note:-
    1. Within Adobe, Edit -> Preferences -> Internet option it's compulsory for our users to have "Display PDF in browser" ticked!
    2. We cannot prevent a Charset from being present within the Content-Type of the response sent to the client, hence this issue.
    Many Thanks in advance,
    Martin.

    Bill,
    This is exactly the same behavior I observed when I rendered a PDF stored in a database through a .NET page. If I chose to save it, it would open fine after the save, but if I chose to open it in the browser without saving it, I would get the error.
    The problem was not with the PDF or Acrobat. It was with the way I was delivering the PDF. Putting the following code before my binarywrite fixed the issue completely:
    Response.ClearHeaders()
    Response.ClearContent()
    Response.ContentType = "application/octet-stream"
    Response.AddHeader("content-disposition", "attachment; filename=" + saveFilename)
    where saveFileName is the name you want to give the PDF.
    You can use 'inline' instead of 'attachment' above if you just want the PDF to open (no option to save first). You can also use 'pdf' instead of 'octet-stream' (not sure the difference).
    The trouble seems to be that .NET puts some info in the header and/or content by default prior to anything your code says to write. If you don't clear this, IE has an issue with it. Other browsers seem to ignore it.
    Bottomline is that this is an issue the website programmer needs to fix and is not something the user can fix by changing some setting(s).
    I hope this helps.

  • Cannot open pdf files from the web

    I have downloaded Adobe REader 10.0.1 twice and restarted my Mac.  Operating syste, Mac OS X 10.6.6.  I cannot open files from the web, but there is no problem with opening previously save files.  Thanks for any suggestions.

    un-installed old version and installed new version of READER and all functions have returned

  • Can't read pdf-files from the web

    Some pdf-files from the web (using Safari 6) is not readable on my iMac, OSX 10.7.4.
    I get a lot of
    instaed of text.
    Why?
    /Karin

    It happens even to me (iMac late 2006, OS X 10.6.8, Safari 5.1.7(6534.57.2)), but instead of ??? I get black screens. Here some links to several PDF files:
    http://www.heathrowairport.com/static/Heathrow/Languages/Downloads/italian-secur ity-guide.pdf
    http://www.crs.lombardia.it/ds/ccurl/487/15/2008_10_15_Manuale_di_installazione_ e_configurazione_del_CRS_Kit_per_Mac_V1.0.pdf
    http://tda.panasonic-europe-service.com/docs/2z508fef28z3z36c0fz6974z706466z23zc 6217222fafecd42377558ba5cd29331bfd3c26a/tsn2/data/EU/TXP42ST50E/OI/890961/TQB0E2 271C.pdf
    http://www.trenitalia.com/cms-file/allegati/trenitalia/treni/Frecciargento_sched atecnica.pdf
    Luciano

  • Downloading PDF files from reliable web-sites U-R-G-E-N-T

    Hi,
    Since last year I encounter regular (close to 100%) problems downloading PDF files from reliable web-sites (for sure web-sites from which I could troubleless download PDF files in the past) The result on my HDD : 0KB pdf file ! = An empty file
    This is very anoying and I am sure I am not the only one who encounters this.
    Please review your procedures and make this possible again.
    Note: I uninstalled Adobe Reader, reset Safari, closed Safari, re-installed Adobe Reader : no results !
    THANKS FOR HELPING ASAP !
    I travel a lot and have to bring my files with me as internet is not always available in the countries where I work
    Christian

    Hi Christian,
    I've had problems for ages with this but I did notice that after I went through the reinstall with Apple yesterday I now have a couple of different options that are working.
    Yesteday I uninstalled reader, restarted my computer and then reinstalled again. I didn't think it had worked for me but after some extra experimentation I have discovered a couple of things.
    On some websites eg: https://www.gatewaycu.com.au/uploadedFiles/PDF/Forms/Quick%20Debit%20Authority.pdf
    it is coming up with a toolbar (I suppose it's called) at the top of the PDF and it is allowing me to print and save to my desktop, open the pdf and print YEAH.
    Also with another website the PDF is showing up differently. eg http://media.wix.com/ugd/99e891_6110f024d956431abb7b66dd24f19251.pdf
    This shows up like it used to but the difference is that if you try to save as or print throught the safari options like I used too it doesn't work, BUT if you hover down the bottom of the PDF it brings up a bar type box (sorry I don't know the technical word for this) then you can print, save to desktop, documents etc and then print from there too.
    YEAH! It looks like (I hope) that the problem is solved. You have to go about it in a couple of different ways depending on the website, but hey, I don't think that's so bad as long as I can actually print my PDF's. It's better that not being able to access any of them which is what's been happening for the last few months.
    I hope this helps you guys out and if you have any problems just let me know and I'll try and explain it better for you.
    Cheers
    Andrea

  • Lately pdf files from the Web do not display properly; what is wrong and how can I fix it so I don't have to use IE?

    I am a professor and frequently need to open pdfs of academic journal articles from electronic databases. Within the last two or three weeks, when I try to do this using Firefox, only the first page of the pdf displays and the rest are blank. In addition, a bar appears across the top with the message "This pdf file may not display properly." So I have had to switch to Internet Explorer to open the files and do my research. What is going on and how can I fix it so I can open pdf files from the Web in Firefox and have them display properly?

    My question is simple - why would you put an application in production that has a lot of bugs? To replace a good and steady Adobe product? My customers will believe that I put a pathetic fallible form online. They are not sophisticated on computers so I just tell them to use IE. Ugh
    I must agree with pgwebgirl!

  • How to download a file from the net and save it into .txt format in a datab

    Can some one show me a tutorial on how to download a file from the net and save it into .txt format in a database?
    Thank you,

    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

  • How to download a file from the internet using terminal

    how to download a file from the internet using terminal
    does any one know how to download afile from the internet using the Terminal application?

    Use curl. Something like this:
    curl -O http://www.example.com/filename.zip
    For more info, type +man curl+.

  • When i try download a file from the internet it looks like its downloading then when i go to open this file it opens up in the app text edit and says it cannot open i DOS mode? Can anyne help?

    when i try to download a file from the internet it starts to download but when its finished it opens up in the app "text edit" and it says this file cannot open in DOS mode.
    Can anyone help?

    It sounds like perhaps the file doesn't have an extension that the system recognizes. Is this all files, or just one specific one, and if so, which? What is the name (and extension, if it has one) of the downloaded file? What kind of file do you *expect* it to be? (PDF, or whatever). Renaming a file with the appropriate extension can often fix that kind of problem.
    Matt

Maybe you are looking for

  • Response time too slow when there is competition in the same connector PCo

    Dear all, I'm having a problem with using PCo 2.1. I created all the conections in PCo with OSIsoft PI and when I create a TagQuery on MII to get the values of a tag is not occur problem in response time. But when I have another TagQuery or Transacti

  • Access image in item render

    hello guys i have an item renderer like so <mx:Component> <mx:HBox width="100%" height="70" paddingLeft="0" paddingRight="0"> <mx:Image id="gb"  source="assets/Warning.png" enabled="true" alpha="1" click="outerDocument.ShowPidmHideDuplicate();"  useH

  • Production staging from WM

    Hi gurus, We are facing a scenario in staging the components from Whse to PSA, In the current legacy we are supplying the component for PSA from WHse back and forth to five step (5 times) inorder to get it as a finished product. Actually we have to m

  • Errors in Nokia Map

    Map on N95 V2, contains many errors. Territores of Bangladesh, in the APAC region are shown as part of India. (e.g. Comilla, Bangladesh, India!)Very funny !

  • MacBook will not Shut Down or Restart

    My MacBook will not shut down or restart from the apple menu, nor from any other dialog box that pops up, after an update, for instance. The only way I can turn it off/restart is by using the power button. I have tried archiving and installing OS X,