Quantcast

Uploading files in v12

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Uploading files in v12

Lee Hinde
In a migrated 2004 database, I'm having problems uploading files using
the built-in web server. I was told, at lunch yesterday with another
4D dev, that file uploads in v12 is borked.

I've not spent much time tracking this down, but it was news to me
that this was a 4D problem.

Can anyone here verify they're able to upload files in v12's web server?

Thanks.
**********************************************************************
4D v12.2 is Available - Now Powered with 64-bit server
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Uploading files in v12

Larry White, P.Eng.
Lee,

Yes it works. The value of maximum web request size has to be reset.  Then
you can do what you want. (set database parameter)

Selector = 27 (Maximum Web requests size)
€ Values: 500 000 to 2 147 483 648.
€ Description: Maximum size (in bytes) of incoming HTTP requests (POST)
that the Web server is authorized to process. By default, the value is 2
000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147
483 648) means that, in practice, no limit is set.
This limit is used to avoid Web server saturation due to incoming requests
that are too large. When a request reaches this limit, the 4D Web server
refuses it.


It is limited to 50kb out of the box.

Cheers,

--
Larry White, P.Eng.
President & Chief Engineer
>Pelican Engineering, Inc.
>>ISO 9001:2008 registered
[hidden email]
www.pelicaneng.ca




On 8/10/11 1:57 PM, "Lee Hinde" <[hidden email]> wrote:

>In a migrated 2004 database, I'm having problems uploading files using
>the built-in web server. I was told, at lunch yesterday with another
>4D dev, that file uploads in v12 is borked.
>
>I've not spent much time tracking this down, but it was news to me
>that this was a 4D problem.
>
>Can anyone here verify they're able to upload files in v12's web server?
>
>Thanks.



**********************************************************************
4D v12.2 is Available - Now Powered with 64-bit server
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Uploading files in v12

Lee Hinde
Thanks Larry.

On Aug 10, 2011, at 10:24 AM, Larry White, P.Eng. wrote:

> Lee,
>
> Yes it works. The value of maximum web request size has to be reset.  Then
> you can do what you want. (set database parameter)
>
> Selector = 27 (Maximum Web requests size)
> € Values: 500 000 to 2 147 483 648.
> € Description: Maximum size (in bytes) of incoming HTTP requests (POST)
> that the Web server is authorized to process. By default, the value is 2
> 000 000, i.e. a little less than 2 MB. Passing the maximum value (2 147
> 483 648) means that, in practice, no limit is set.
> This limit is used to avoid Web server saturation due to incoming requests
> that are too large. When a request reaches this limit, the 4D Web server
> refuses it.
>
>
> It is limited to 50kb out of the box.
>
> Cheers,
>
> --
> Larry White, P.Eng.
> President & Chief Engineer
>> Pelican Engineering, Inc.
>>> ISO 9001:2008 registered
> [hidden email]
> www.pelicaneng.ca
>
>
>
>
> On 8/10/11 1:57 PM, "Lee Hinde" <[hidden email]> wrote:
>
>> In a migrated 2004 database, I'm having problems uploading files using
>> the built-in web server. I was told, at lunch yesterday with another
>> 4D dev, that file uploads in v12 is borked.
>>
>> I've not spent much time tracking this down, but it was news to me
>> that this was a 4D problem.
>>
>> Can anyone here verify they're able to upload files in v12's web server?
>>
>> Thanks.
>
>
>
> **********************************************************************
> 4D v12.2 is Available - Now Powered with 64-bit server
> http://www.4d.com/products/new.html
>
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D v12.2 is Available - Now Powered with 64-bit server
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Uploading files in v12

Keisuke Miyako
In reply to this post by Lee Hinde
be sure to use the latest version;

there were issues in earlier versions,
where the upper threshold of a web request was much lower than 2004,
despite what you set with the max web req db parameter.

it had something to do with 4D copying the entire http body to $2,
which used to be truncated to 32k in 2004 but in Unicode mode... well, you get the picture.
this is fixed now, but maybe your colleague had some bad experiences in an earlier version.

miyako

On 2011/08/11, at 1:57, Lee Hinde wrote:

> I was told, at lunch yesterday with another
> 4D dev, that file uploads in v12 is borked.





**********************************************************************
4D v12.2 is Available - Now Powered with 64-bit server
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Uploading files in v12

Lee Hinde
In reply to this post by Lee Hinde

On Aug 10, 2011, at 9:57 AM, Lee Hinde wrote:

> In a migrated 2004 database, I'm having problems uploading files using
> the built-in web server. I was told, at lunch yesterday with another
> 4D dev, that file uploads in v12 is borked.
>
> I've not spent much time tracking this down, but it was news to me
> that this was a 4D problem.
>
> Can anyone here verify they're able to upload files in v12's web server?
>
> Thanks.

Here's the solution, for future Googlers.


I got several pointers to the Set Database Parameter - Maximum Web requests size. They pointed out that the default is now lower than before. That was good to know.

The image parsing, it turns out, was what was breaking in my code. I was using this snippet for processing uploaded image files:

http://www.4dresources.com/codefaq/uploads1.shtml

There is a call:
$t_blobText:=BLOB to text($xb_tempBlob;Text without length)

Which got changed during the conversation to v12 to "Unicode Text without length".  Everything started working when I changed it to "Mac Text without length".


**********************************************************************
4D v12.2 is Available - Now Powered with 64-bit server
http://www.4d.com/products/new.html

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Loading...