Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Blob loading URL
Thu, Jun 14 2018 10:08 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi All,

with v2.04 i was using following to show blob fields:

'online/datasets?dataset=AlleProjektdokumenter&method=load&column=dokument&row='
+ inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger)

I can see syntax has changed, but following does not work either, cannot
load document to be shown?

'databases?method=load&database=OnlineDB&dataset=AlleProjektdokumenter&column=dokument&row='
+ inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger);

Do I miss something here?

Regards,

Hüseyin

Fri, Jun 15 2018 12:12 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Huseyin,

<< with v2.04 i was using following to show blob fields:

'online/datasets?dataset=AlleProjektdokumenter&method=load&column=dokument&row='
+ inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger)

I can see syntax has changed, but following does not work either, cannot
load document to be shown?

'databases?method=load&database=OnlineDB&dataset=AlleProjektdokumenter&column=dokument&row='
+ inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger); >>

Did you make sure that the base URL ('databases') is correct and matches what the EWB IDE/Web Server expects ?  This is a configurable item for both, and will still retain the 2.04 settings unless you specifically change them.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Jun 15 2018 5:27 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Tim,

I was trying from the internal server, i did not try on deployed config.

Internal server:

[Server_Internal]
Description=Internal Web Server
URL=http://localhost
Port=8080
Auto Start=1
Databases Resource Name=databases
Database Modules Resource Name=customdatasets
Modules Resource Name=modules
Enable Debugging=0

Regards,

Hüseyin



Den 15-06-2018 kl. 18:12 skrev Tim Young [Elevate Software]:
> Huseyin,
>
> << with v2.04 i was using following to show blob fields:
>
> 'online/datasets?dataset=AlleProjektdokumenter&method=load&column=dokument&row='
> + inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger)
>
> I can see syntax has changed, but following does not work either, cannot
> load document to be shown?
>
> 'databases?method=load&database=OnlineDB&dataset=AlleProjektdokumenter&column=dokument&row='
> + inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger); >>
>
> Did you make sure that the base URL ('databases') is correct and matches what the EWB IDE/Web Server expects ?  This is a configurable item for both, and will still retain the 2.04 settings unless you specifically change them.
>
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
Mon, Jun 18 2018 9:12 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

News on this:

- Images from blob loads and shows without problems.
- Word document downloads but as empty.
- PDF does not download/show at all, fails.

Tried on another PC, same result.

Regards,
Hüseyin

Den 15-06-2018 kl. 23:27 skrev Hüseyin Aliz:
> Hi Tim,
>
> I was trying from the internal server, i did not try on deployed config.
>
> Internal server:
>
> [Server_Internal]
> Description=Internal Web Server
> URL=http://localhost
> Port=8080
> Auto Start=1
> Databases Resource Name=databases
> Database Modules Resource Name=customdatasets
> Modules Resource Name=modules
> Enable Debugging=0
>
> Regards,
>
> Hüseyin
>
>
>
> Den 15-06-2018 kl. 18:12 skrev Tim Young [Elevate Software]:
>> Huseyin,
>>
>> << with v2.04 i was using following to show blob fields:
>>
>> 'online/datasets?dataset=AlleProjektdokumenter&method=load&column=dokument&row='
>>
>> + inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger)
>>
>> I can see syntax has changed, but following does not work either, cannot
>> load document to be shown?
>>
>> 'databases?method=load&database=OnlineDB&dataset=AlleProjektdokumenter&column=dokument&row='
>>
>> + inttostr(DokumenterForm.Projektdokumenter.columns['ID'].asInteger); >>
>>
>> Did you make sure that the base URL ('databases') is correct and
>> matches what the EWB IDE/Web Server expects ?  This is a configurable
>> item for both, and will still retain the 2.04 settings unless you
>> specifically change them.
>>
>> Tim Young
>> Elevate Software
>> www.elevatesoft.com
>>
>
Mon, Jun 18 2018 2:40 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Huseyin,

<< - Images from blob loads and shows without problems.
- Word document downloads but as empty.
- PDF does not download/show at all, fails. >>

Are these all using BLOBs in a database, or different methods ?  The latter two are most likely due to invalid content types/encodings and/or content lengths in the HTTP responses.

Tim Young
Elevate Software
www.elevatesoft.com
Mon, Jun 18 2018 4:35 PMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Tim,

Same blob field can contain image or documents/files. As I wrote in the
beginning this worked fine with 2.04, so something must have changed in
2.06 beside the syntax, or i am missing something Smile

Regards,
Hüseyin

Den 18-06-2018 kl. 20:40 skrev Tim Young [Elevate Software]:
> Huseyin,
>
> << - Images from blob loads and shows without problems.
> - Word document downloads but as empty.
> - PDF does not download/show at all, fails. >>
>
> Are these all using BLOBs in a database, or different methods ?  The latter two are most likely due to invalid content types/encodings and/or content lengths in the HTTP responses.
>
> Tim Young
> Elevate Software
> www.elevatesoft.com
>
Mon, Jun 18 2018 5:53 PMPermanent Link

Raul

Team Elevate Team Elevate

On 6/18/2018 4:35 PM, Hüseyin Aliz wrote:
> Same blob field can contain image or documents/files. As I wrote in the
> beginning this worked fine with 2.04, so something must have changed in
> 2.06 beside the syntax, or i am missing something Smile

Yes, but how browser interprets is down to the Content-Type responce header.

What does your browser debug tools show for each of these URLs ?

Is the PDF shown as "Content-Type: application/pdf" for example

Raul

Wed, Jun 20 2018 6:08 AMPermanent Link

Huseyin Aliz

myBiss ApS

Avatar

Hi Raul,

Thanks for input. Following from fiddler (raw tab):

HTTP/1.1 200
Date: Wed, 20 Jun 2018 10:06:24 GMT
From:
Server: Online Server
Connection: Keep-Alive
Cache-Control: no-cache
Content-Type: application/pdf
Content-Length: 0

Regards,
Hüseyin

Den 18-06-2018 kl. 23:53 skrev Raul:
> On 6/18/2018 4:35 PM, Hüseyin Aliz wrote:
>> Same blob field can contain image or documents/files. As I wrote in
>> the beginning this worked fine with 2.04, so something must have
>> changed in 2.06 beside the syntax, or i am missing something Smile
>
> Yes, but how browser interprets is down to the Content-Type responce
> header.
>
> What does your browser debug tools show for each of these URLs ?
>
> Is the PDF shown as "Content-Type: application/pdf" for example
>
> Raul
>
>
Wed, Jun 20 2018 8:33 AMPermanent Link

Matthew Jones

Hüseyin Aliz wrote:

> Content-Length: 0

That's where the problem lies then - something is stopping the blob getting out. Right reference? Is the blob actually there?

--

Matthew Jones
Wed, Jun 20 2018 8:36 AMPermanent Link

Raul

Team Elevate Team Elevate

On 6/20/2018 6:08 AM, Hüseyin Aliz wrote:
> Content-Type: application/pdf
> Content-Length: 0

In your case it's returning 0 bytes so correct mime type but no content

I tried it here with 2.06 Build 15 and it works fine for me - using both
built-in as well as EWB Web Server

I used databound sample database and manually put some PDF and MS Word
blob data in there

Request for PDF record looks like this :

http://192.168.0.200:8888/databases?method=load&database=ExampleData&dataset=Customer&column=ContactPhoto&row=AAA

and I do get back proper content (PDF shows in browser) and headers look
as follows :

HTTP/1.1 200
Date: Wed, 20 Jun 2018 12:30:13 GMT
From:
Server: Elevate Web Builder Web Server
Connection: Keep-Alive
Cache-Control: no-cache
Content-Type: application/pdf
Content-Length: 23038


for MS Word doc it prompts to save the file but that otherwise works fine.

http://192.168.0.200:8888/databases?method=load&database=ExampleData&dataset=Customer&column=ContactPhoto&row=BBB

and headers returned:

HTTP/1.1 200
Date: Wed, 20 Jun 2018 12:31:12 GMT
From:
Server: Elevate Web Builder Web Server
Connection: Keep-Alive
Cache-Control: no-cache
Content-Type: application/msword
Content-Length: 16543

Works as expected here with latest version

Only difference is you're still using the older datasets url format with
custom prefix (online) but assuming everything is configured properly it
should work - i would hence double check all your resource names etc.


Raul
Page 1 of 2Next Page »
Jump to Page:  1 2
Image