Library UploadUrl : Cannot determine the file size

Hi,

I’m encountering the following error “Cannot determine the file size” while trying to upload an image through URL.

I tried both uploading through web ui AND api (/api/library/uploadUrl) and it did not work.

I double checked that my image URL was working, downloaded the image through my web browser (it worked), checked that there was no redirection or anything like that. Image won’t load only on xibo. Curl and wget are also working.

When using wget, this is the trace i get for a file that doesn’t work :

–2020-08-10 00:28:12-- **********/38474393a.jpg
Résolution de ******************* (
)… ********************
Connexion vers ************** ()||:443…connecté.
requête HTTP transmise, en attente de la réponse…200 OK
Longueur: non spécifié [image/jpeg]
Sauvegarde en : «38474393a.jpg»

And for a file that works

–2020-08-10 00:39:45-- /nw2018_cordee221dsc_0103.jpg
Résolution de ****************** (
*)… *********************
Connexion vers ********************* ()|
|:443…connecté.
requête HTTP transmise, en attente de la réponse…200 OK
Longueur: 105387 (103K) [image/jpeg]
Sauvegarde en : «nw2018_cordee221dsc_0103.jpg»

I think the fact that “length” is not specified on the not working image is the issue. I there a workaround to allow images without specified length to be download ?

Thanks a lot,

Artandor

We need to be able to know the size of the image before we download it - so we can check it will fit in any quota applied to the CMS or user.

Otherwise you could cause problems by pointing the method at a URL that never completed downloading (eg an http video stream).

No way to bypass it ?

Did you ever experience something similar ? The server sending the pictures to me is not under my control, but maybe there is a solution for me to actually get the file size ?

You could change the code to bypass that check, but it’s a bad idea for the reasons I’ve already set out. If someone then points the CMS at a stream or a very large file bad things will happen. The check is there for a reason!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.