• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 10.4 and new File now longer works for uploading a file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 10.4 and new File now longer works for uploading a file


  • Subject: Re: 10.4 and new File now longer works for uploading a file
  • From: Anjo Krank <email@hidden>
  • Date: Tue, 26 Jul 2005 09:12:36 +0200

Am 26.07.2005 um 09:07 schrieb Helge Städtler:

I wonder if this code you pasted here really ever compiled... because you
will at least have to declare in the method "uploadFile" some statement like
"throws Exception" right, or does NSForwardException not need this statement
(do not know this at the moment exactly)?

No, but it doesn't make much sense anyway. A simple

 throw new RuntimeException("Bla")

should be enough.

Cheers, Anjo


I would just have a closer look to the stacktrace of the exceptions thrown.
Maybe you have a permissionsproblem.


having <drwxrwx--x 27 baiss admin 918 Jul 22 13:53 Flyers>
may work well for development if user "baiss" is opening xCode. but in
deployment if the "appserv"-user is running the application this may become
a problem. generally WO apps in deployment seem to run with the rights by
whom "wotaskd" is owned. so if "root" is owner of "wotaskd" it will run with
root-rights and in this case ANY permission-problem will disappear
(downside: you will have to know what you do, but this is valid anyway...).


for me it strongly looks like a permissions problem (new server = new
users/setup)... try uploading to the /tmp/ - directory this is in any case
accessable.


regards,
helge



Am 26.07.2005 0:16 Uhr schrieb "Baiss Eric Magnusson" unter <email@hidden>
/ On 26.07.2005 0:16 Uhr "Baiss Eric Magnusson" wrote using address
<email@hidden>:



I have the following code which used to work...

   public WOComponent uploadFile()  {
       if ( actualFilePath == null || actualFilePath.length() <= 0) {
           throw new NSForwardException( new Exception
("actualFilePath was null, or there were zero bytes in the file, when
the uploadFile button was clicked. "), "uploadFile" );
       }
       try {
           File uploadedFile = new File( actualFilePath );
           bytesWritten = uploadedFile.length();
           if ( bytesWritten <= 0 )  {
               throw new NSForwardException( new Exception
("bytesWritten is zero or less. To-> " + actualFilePath), " ***
uploadFile ***" );
           }
       } catch ( Exception e )  {
           throw new NSForwardException( e, "An exception was
thrown when trying to <uploadFile>. " + e.toString() );
       }
       return null;
   }


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40logicunited.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: 10.4 and new File now longer works for uploading a file (From: Helge Städtler <email@hidden>)

  • Prev by Date: Re: RR loop confusion....
  • Next by Date: Re: Status of WOLips?
  • Previous by thread: Re: 10.4 and new File now longer works for uploading a file
  • Next by thread: Re: 10.4 and new File now longer works for uploading a file
  • Index(es):
    • Date
    • Thread