Problem upload file with ftp

Hi,
I'd like to upload a file with an ftp. I declared a method using an url as follow :
public static void uploadFile(File fileToMove_p, String newFileName_p) {
try {
URL url_l = new URL("ftp://[uid]:[pwd]@localhost/" + newFileName_p);
URLConnection connection_l = url_l.openConnection();
OutputStream output_l = connection_l.getOutputStream();
BufferedOutputStream bos = new BufferedOutputStream(output_l);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(fileToMove_p));
int i;
while ((i = bis.read()) != -1) {
bos.write(i);
catch (IOException ex) {}
But when I oppen my new file, it miss the end of my data. The ftp cut the few last line of my original file.
Any idear of what is happening here and how I can solve the problem ?
Thanks

Are you closing the OutputStream? If not, you probably should, and closing the stream will flush it prior to closing.
HTH,
§

Similar Messages

  • Having problem uploading files with file manager

    When i use file manager and try to select a file from desktop then desktop disappears quickly so you can't even select the file you want.  I'm using firefox 25 and i thought it was that so i deleted firefox and reinstalled firefaox and get the same problem.
    It tried with safari and it works ok.  Any ideas on how to fix this?  Its really annoying.
    Thanks,
    Den

    Well, since you didn't mention exactly what the problem is, I have to assume you have not set up your website definition properties correctly. There are plenty of good step by step instructions in the help files for setting up your website definition.

  • [SOLVED]cURL got problem uploading file with "[]" in the name

    $ curl -# -iv -u username:passwd -T '[gg].png' 'ftp://ftp.liondrive.com:2221'
    curl: (3) [globbing] error: bad range specification after pos 2
    When I rename [gg].png to gg.png, it's all just fine.
    Anybody encountered same thing?
    What's the problem?
    Last edited by lolilolicon (2009-06-24 07:18:05)

    OK, I got it
    The problem is caused by curl attempting to do globbing on urls that contain []{}. The best fix would probably be for hpodder to invoke curl with --globoff.
    ....Ha, should have googled the error message before posting. Sorry.
    Edit
    another woraround is use escape...
    curl -# -iv -u username:passwd -T '\[gg\].png' 'ftp://ftp.liondrive.com:2221'
    Last edited by lolilolicon (2009-06-24 07:26:43)

  • Upload files with swedish characters NS 4.7

    Hi,
    I can upload files with swedish characters in the file name with IE 5, but not with Netscape 4.7. iFS presents an error message that the file doesn't exist or is empty.
    Is there a solution for this problem?
    /Elin
    null

    check out if you are using javascripts and whether IE supports it
    Roberto Nanamura <[email protected]> wrote:
    >
    Hi,
    I am having a problem uploading files with Internet Explorer, it works with
    Netscape Communicator. Has someone had the same problem?
    I am using WebLogic 5.1 service pack 5 with Netscape iPlanet 4.1 service pack 2
    in a Solaris 7.
    Best regards,
    Roberto N Nanamura
    Technical Consultant
    Summa Technologies

  • Impossible Upload files with Filezilla FTP Client after upgrade win8 to win8.1

    Hi
    Things were working fine with win 8 but, after Upgrade to win 8.1 is not possible upload files with Filezilla  FTP Client.
    is there anyone facing same problem?
    thanks in advance for any answer to help me solve this issue 
    Regards 
    TC

    Hi,
    Please Change your transfer settings in site manager from either default or passive to active it to see what's going on.
    Also, check IE compatibility mode.
    In addition, I suggest you install all latest updates for Windows since these updates will improve and fix some known issues.
    Kate Li
    TechNet Community Support

  • Problem on upload file via ftp..

    Hi afternnon,
    Can have people tell me.....what is "Can't open data connection" on my upload file via ftp ????how to solve it??
    regards,
    mike

    nbelford wrote:
    I cant find any way to upload the CSR either/ I dont think it exists yet. Can someone please let us know how far away it is. Same applies to the provisioning profile. I cant see any evidence of this yet either.
    I am presuming that without these key pieces of the puzzle one cannot deploy to the iPhone. Can someone from Apple confirm (or correct me)
    I've emailed Apple asking for clarification but I haven't heard back yet. I imagine we'll all learn what's going on at about the same time. And yes, until you get a certificate you cannot upload your apps to the iPhone (within the SDK rules).
    Randy

  • Problem uploading files from Dreamweaver CS3 to Yahoo

    I am having a problem uploading files from Dreamweaver CS3 to
    an FTP site on Yahoo.
    The error message I get is "No response from server.
    Reconnecting..."
    I am able to connect to Yahoo using other FTP clients
    successfully.
    I am able to connect to Yahoo using Dreamweaver MX 2004
    successfully.
    I tried playing with various settings (i.e. passive ftp,
    server compatibility options) but to no avail.
    Any thoughts on this would be appreciated.
    Thank you,
    Steven

    I tried enabling passive FTP but it doesn't help.

  • Problem uploading files

    I'm having a big problem trying to upload files - whether it is as an email attachment or homework for and online class. I get to the file I want to attach, and the ‘choose’ button does not become clickable, and then the entire web browser freezes up. The only thing to do then is to force quit and try again, but it never works. My dad bought a MacBook at the same time I did and he has no problem uploading files. Does anyone have any suggestions? It will be quite annoying if I have to transfer all of my documents on a flash drive to another computer every time I need to upload something. Thanks in advance!
    MacBook    

    Welcome to Apple Discussions!
    The variety of uploading tools can be a bit daunting, and the design of websites that allow for uploading can also be. Ideally a website can be set to have a common FTP server that everyone can upload to with a standard FTP program such as http://www.rbrowser.com/ or http://rsug.itd.umich.edu/software/fugu/
    If it is a website with a choose file from hard drive type setup, it may be the code of the website is poorly designed for specific browsers as my FAQ here explains:
    http://www.macmaps.com/browser.html
    As for sending e-mail, if you are sending e-mail to Windows users, use the attachment toolbar button in Apple's Mac OS X Mail by first making sure it is there in the View menu -> Customize Toolbar, and you'll find in the dialog to choose documents a checkbox for Send Windows Friendly Attachments.
    If you are connecting a server with Appleshare or NTFS drives that's whole different issue which may have to deal with firewall ports.
    So the real question is, what method are you using to send files to other people, and what operating system do the other people have?

  • How to associate an uploaded file with form data

    I have a "ticketing" app which stores a ticket no. as well as allows users to upload multiple files per ticket. The problem I am having is how to associate an uploaded file with a particular ticket no. As you can guess this becomes complicated when the same user can potentially update multiple tickets using the same file names. I am having difficulty trying to understand how to associate a ticket no with one or more uploaded files. I do have a custom table which I update with the attachments but I am unsure how to, or when to, update the ticket information on this custom table. I only want to retrieve attachments for a given ticket, not all attachments uploaded by a user.Does anyone have any ideas?

    Hi,
    My question is bit related to this topic.
    I am having a requirement to upload the CSV files so that they will store in a database table and later on wards when they search on that table it needs to pull the information and display on the form. I am a new bee to application express. Could some body tell me how to start this process with??. Just give me an overvoew/hints so that I will try to carry on my own.
    Cheers,
    Krishna.

  • Logic to upload file with dynamic columns

    hi
    in my requirement i hav given to add logic to upload file with dynamic columns so that this upload program can be reused.
    this way the program is flexible, irrespective of the number of columns in the file.
    can any one explain this?
    and let me know what actually i hav to do.

    Check the program and the dynamic column is in the col_pos internal table and in the routines get_structure onwards.
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/scm/dynamic%2bstructures%2band%2bcomponents
    cheers
    Aveek

  • Having problem opening files with gradients in CS2

    When I try to open an illustrator 9 file from CS2, I get "An unknown error has occurred." message. I believe this may be a CS2 problem because when I checked further, I discovered that only AI 9 files where the gradient feature was used were affected. Any suggestions would be appreciated.

    Hi Sjmitc, I followed Barbara's instructions about only about 24 hours ago and since then my files have been opening perfectly.  I tried it again before replying to you and they are still opening fine.
    I did have to go through my files a couple of times to find all the Elements preferences, but the solution is working fine so far.  I will let you know if I have any further problems.  It is maddening when it happens, so I hope you can fix yours.
    Best of Luck 
    Date: Wed, 6 Nov 2013 18:23:28 -0800
    From: [email protected]
    To: [email protected]
    Subject: Problem opening files with Mac OS Mavericks and Elements
        Re: Problem opening files with Mac OS Mavericks and Elements
        created by sjmitc in Photoshop Elements - View the full discussion
    Henwen, Is this solution still working for you? I tried this same solution on mine a few days ago and had no luck. However, it actually let me open files this afternoon then when I went back in later today, it was doing the disappearing act again.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5821793#5821793
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5821793#5821793
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5821793#5821793. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Problem opening files with Mac OS Mavericks and Elements

    I have recently installed Mac OS 10.9.x Mavericks.  Since this I have had problems opening files in Elements 11.  I upgraded to Elements 12, blindly hoping the problem would fix itself, however it hasn't.   When I try to open a file the Finder window pops up then disappears immediately.  Occasionally it will stay open until I scroll down but then closes.   I keep the files on an external drive but the drive is working with all other applications, so I don't think it is that.  If anyone has had a similar problem and has any ideas I would be grateful as the program is unusable for now.  Thanks very much in anticipation

    Hi Sjmitc, I followed Barbara's instructions about only about 24 hours ago and since then my files have been opening perfectly.  I tried it again before replying to you and they are still opening fine.
    I did have to go through my files a couple of times to find all the Elements preferences, but the solution is working fine so far.  I will let you know if I have any further problems.  It is maddening when it happens, so I hope you can fix yours.
    Best of Luck 
    Date: Wed, 6 Nov 2013 18:23:28 -0800
    From: [email protected]
    To: [email protected]
    Subject: Problem opening files with Mac OS Mavericks and Elements
        Re: Problem opening files with Mac OS Mavericks and Elements
        created by sjmitc in Photoshop Elements - View the full discussion
    Henwen, Is this solution still working for you? I tried this same solution on mine a few days ago and had no luck. However, it actually let me open files this afternoon then when I went back in later today, it was doing the disappearing act again.
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5821793#5821793
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5821793#5821793
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5821793#5821793. In the Actions box on the right, click the Stop Email Notifications link.
               Start a new discussion in Photoshop Elements at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • Upload files with international content

    I want to upload files with international content(many languages), from
    a single JSP. Any ideas?
    thanks,
    M.

    Hi Marco,
    I dont know transaction CV02N. But if this application uses standard function modules like GUI_UPLOAD it should work with ITS. A special configuration should not be required as long as the files have a size up to 5 MB. If they are larger it might be required to adjust the size of the request container MaxReqSize. Dont forget that Java has to be activated to let webgui access the filesystem.
    Regards,
    Klaus

  • Problem in Uploading Files with Categories

    Hi All,
    We are working on uploading files to Content Database(CDB) after creating categories for all files to be uploaded individually. The code is working fine when we are using FdkConstants.ATTRIBUTE_TYPE_STRING for Attributes.ATTRIBUTE_TYPE while creating named-value pair for categoryAttributes. In this case all the files are uploading with category.
    But the problem we are facing is, when we use datatype other than STRING for FdkConstants like FdkConstants.ATTRIBUTE_TYPE_INTEGER, or FdkConstants.ATTRIBUTE_TYPE_BINARY…….. category sub class is not creating, and getting errors like
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
    faultActor:
    faultNode:
    faultDetail:
         {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.MetadataOperationFailed</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.MetaDataError</errorCode><exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:string"/>
         {http://xml.apache.org/axis/}hostname:bluejays.appsassociates.com
    ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
         at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
         at oracle.ifs.fdk.FdkException.getDeserializer(FdkException.java:270)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
         at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
         at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
         at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
         at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
         at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207)
         at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
         at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
         at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
         at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
         at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
         at org.apache.axis.client.Call.invoke(Call.java:2748)
         at org.apache.axis.client.Call.invoke(Call.java:2424)
         at org.apache.axis.client.Call.invoke(Call.java:2347)
         at org.apache.axis.client.Call.invoke(Call.java:1804)
         at oracle.ifs.fdk.CategoryManagerSoapBindingStub.createCategorySubClass(CategoryManagerSoapBindingStub.java:611)
         at oracle.ifs.fdk.client.impl.CategoryManagerProxy.createCategorySubClass(CategoryManagerProxy.java:100)
         at scheduleUpload.AarlmsUpload.createCategory(AarlmsUpload.java:851)
    Can anyone please solve our problem why this is happening? Please give solution as early as possible.
    Thanks in advance
    Eswari

    Hi Shashikumar,
    Can i have your mail id.
    I have some documents on bid process.
    Best Regards,
    Anil Rajpal

  • Problems uploading images with uppercase (.JPG) file extension.

    I am using coldfusion 8 and have no problems uploading an image using CFFile when the image has a lowercase file extensions such as .jpg however if the same file has a Uppercase file extension .JPG coldfusion hangs and then just times out. The files are exactly the same just different cases in the extensions.
    Any idea?
    My cffile is set as such   <cffile accept="image/*" action="upload" destination="#uploadfolder2#" filefield="profilePictureFileBrowser" nameconflict="makeunique" >
    I tried changing the accept property to image/*, image/jpg, image/JPG but that did not fix the problem either

    Thanks for the quick reply. So I removed the tag and even though I get an error after submitting the form it appears to not hang anyways. Any idea how to fix this?
    I am on a windows 2003 server so cases sensitifity should not be a problem. I am perplexed as to why this would work with lowercase extensions an not upper?

Maybe you are looking for