Hi,
I have the following code: html form: [ html fileUpload callback: [:f | self halt]. html submitButton text: 'Load']. When I select a file for uploading and the callback is executed I see that the file returned to me is not the full pathname. Is there a way to get the full pathname of the selected file? Thanks, Frank _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>>>>> "Squeaker" == Squeaker <[hidden email]> writes:
Squeaker> When I select a file for uploading and the callback is executed I see that the Squeaker> file returned to me is not the full pathname. Squeaker> Is there a way to get the full pathname of the selected file? You mean the client-provided pathname? The meaningless arbitary string of characters? If so, no, and that's a good thing. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
What Randal is trying to say is that this is intentionally not provided
by the browser for security reasons. :) -Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Randal L. Schwartz > Sent: Friday, February 15, 2008 1:15 PM > To: Squeaker > Cc: [hidden email] > Subject: Re: [Seaside] file upload > > >>>>> "Squeaker" == Squeaker <[hidden email]> writes: > > Squeaker> When I select a file for uploading and the callback is > I see that the > Squeaker> file returned to me is not the full pathname. > > Squeaker> Is there a way to get the full pathname of the selected file? > > You mean the client-provided pathname? The meaningless arbitary string > of characters? > > If so, no, and that's a good thing. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 > 0095 > <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl > training! > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Boris Popov wrote:
> What Randal is trying to say is that this is intentionally not provided > by the browser for security reasons. > > :) > > -Boris > Thanks to you both (Randall and Boris). I was going down the wrong path, you comment made me realize it. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Boris Popov, DeepCove Labs (SNN)
On 2/15/08, Boris Popov <[hidden email]> wrote:
> What Randal is trying to say is that this is intentionally not provided > by the browser for security reasons. Except IE, which does provide it, which is why WAFile>>fileName goes out of its way to get rid of that :) Avi _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Heh, now that I look at it, indeed.
-Boris -- +1.604.689.0322 DeepCove Labs Ltd. 4th floor 595 Howe Street Vancouver, Canada V6C 2T5 http://tinyurl.com/r7uw4 [hidden email] CONFIDENTIALITY NOTICE This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments. Thank you. > -----Original Message----- > From: [hidden email] [mailto:seaside- > [hidden email]] On Behalf Of Avi Bryant > Sent: Friday, February 15, 2008 2:31 PM > To: Seaside - general discussion > Subject: Re: [Seaside] file upload > > On 2/15/08, Boris Popov <[hidden email]> wrote: > > What Randal is trying to say is that this is intentionally not provided > > by the browser for security reasons. > > Except IE, which does provide it, which is why WAFile>>fileName goes > out of its way to get rid of that :) > > Avi > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by squeakman
> html form: [ html fileUpload
> callback: [:f | self halt]. > html submitButton text: 'Load']. I wonder how this callback is trigger **at all**, if you don't declare the form as being multipart? Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Lukas Renggli wrote:
>> html form: [ html fileUpload >> callback: [:f | self halt]. >> html submitButton text: 'Load']. > > I wonder how this callback is trigger **at all**, if you don't declare > the form as being multipart? > > Lukas > Could you explain why it has to be part of a multipart form? I hope the answer is not too obvious :) _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> > I wonder how this callback is trigger **at all**, if you don't declare
> > the form as being multipart? > > > > Lukas > > > > Could you explain why it has to be part of a multipart form? I hope the > answer is not too obvious :) not too obvious (wasn't really aware of it) but documented in the method ;) Searching is not so easy... to find the method I searched for selectors containing multipart (cmd+shift+w), then (there are some) I had to find the class where it's defined... Google helped me too :) WAForemTag>>multipart "Sets the content type used to submit the form to the server (when the value of method is 'post') to multipart/form-data instead the default application/x-www-form-urlencoded. This should be used in combination with a WAFileUploadTag." self attributeAt: 'enctype' put: 'multipart/form-data' more information here: http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 "The content type "application/x-www-form-urlencoded" is inefficient for sending large quantities of binary data or text containing non-ASCII characters. The content type "multipart/form-data" should be used for submitting forms that contain files, non-ASCII data, and binary data." Cédrick _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |