Upload of files fail in 9.3.1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload of files fail in 9.3.1

Jolle Carlestam-2
Another unexpected change in 9.3.1. This time confirmed to fail on both OS X and on Linux 6.

Uploading files with anything but English chars in the file name will corrupt the name.
Here’s test code to try it with:

[
local(
        upload = web_request -> fileuploads,
        file_subject = wrp('subject'),
)
]
<!DOCTYPE html>
<html lang="en">
<head>
        <title>File upload test</title>
</head>
<body>
        <form action="" method="post" enctype="multipart/form-data">
                <input type="text" name="subject" value=""><br>
                <input type=file name="upfile"><br>
                <input type=submit value="submit">
        </form>
        <hr>
[#file_subject
br
#upload -> size ? #upload -> first -> find('filename')
]
</body>
</html>


Uploading a file called Räksmörgås.png with a subject input ”Räksmörgåsen” will keep the input text but corrupt the filename.

->
Räksmörgåsen
array((filename = Ra �ksmo �rga �s.png))


This worked prior to 9.3.1.


HDB
Jolle


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Upload of files fail in 9.3.1

Mason Miller
In Lasso 8.6 I am getting an odd behavior:

This code:


                        [records]
                        <a onclick="checkChecker('[field:'jobItemID']');">
                        <div class="jwThumbHolder jwThumbBackColor" id="thumberHolder-[field:'jobItemID']">
                        <input type="checkbox" name="selector" value="[field:'jobItemID']" style="font-family: Verdana, Arial, Sans-serif; font-size: 12px; color: #000000;display:none" id="checker-[field:'jobItemID']">
                        <div class="jwThumbDisplay" style="background-image: url([field:'thumbpath']);"></div>
                        <div class="jwThumbIcons">
                        <a href="thumbs-popup.html?photo=[field:'path']" onclick="NewWindow(this.href,'name','[math_add:(integer:(field:'width')), 25]','[math_add:(integer:(field:'height')), 40]','no');return false;"><span title=" Click here to see an enlarged version of this image " class="popup"><div data-icon="&#xe125;" style="color: #888888; font-size: 14px;"></div></span></a>
                        </div>
                        <div class="jwHandle"></div>
                        </div>
                        </a>

                        [/records]
Generates:

<div class="jwThumbHolder jwThumbBackColor" id="thumberHolder-1692"><a onclick="checkChecker('1692');">
                        <input type="checkbox" name="selector" value="1692" style="font-family: Verdana, Arial, Sans-serif; font-size: 12px; color: #000000;display:none" id="checker-1692">
                        <div class="jwThumbDisplay" style="background-image: url(/users/jw/masonmiller/12488/st/Räksmörgåsen.jpg);"></div>
                        </a><div class="jwThumbIcons"><a onclick="checkChecker('1692');">
                        </a><a href="thumbs-popup.html?photo=/users/jw/masonmiller/12488/images/R&amp;&amp;-session=admin:2669C74C0291423182tQhSD404B2#228;ksmörgåsen.jpg" onclick="NewWindow(this.href,'name','625','440','no');return false;"><span title=" Click here to see an enlarged version of this image " class="popup"><div data-icon="" style="color: #888888; font-size: 14px;"></div></span></a>
                        </div>
                        <div class="jwHandle"></div>
</div>

It appears that Lasso is getting mucked up knowing where to add the session info to the path. Has anyone seen this before?


> On Jan 5, 2016, at 10:30 AM, Jolle Carlestam <[hidden email]> wrote:
>
> Another unexpected change in 9.3.1. This time confirmed to fail on both OS X and on Linux 6.
>
> Uploading files with anything but English chars in the file name will corrupt the name.
> Here’s test code to try it with:
>
> [
> local(
> upload = web_request -> fileuploads,
> file_subject = wrp('subject'),
> )
> ]
> <!DOCTYPE html>
> <html lang="en">
> <head>
> <title>File upload test</title>
> </head>
> <body>
> <form action="" method="post" enctype="multipart/form-data">
> <input type="text" name="subject" value=""><br>
> <input type=file name="upfile"><br>
> <input type=submit value="submit">
> </form>
> <hr>
> [#file_subject
> br
> #upload -> size ? #upload -> first -> find('filename')
> ]
> </body>
> </html>
>
>
> Uploading a file called Räksmörgås.png with a subject input ”Räksmörgåsen” will keep the input text but corrupt the filename.
>
> ->
> Räksmörgåsen
> array((filename = Ra �ksmo �rga �s.png))
>
>
> This worked prior to 9.3.1.
>
>
> HDB
> Jolle
>
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>


#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>