ImageUpload works on Developer but not on Test or Prod environment

Hi, I'm using the ImageUpload Entity in a project and using the CreateOrUpateImage to insert an image to the Entity (table).  My project is based on this fine article:  

It all works great in the Developer version but when I publish it to testing and Production servers it does not work!  Do I have to publish any otehr projects or Dependencys to the other servers to get it to work?

Has anyone experienced this ?

Hi Viktor,

Could you be a little more clear on what exactly does not work on your Test and Production environment? Does an error pop up in your Service Center logs?



Hi Viktor,

Could you please add the error you are getting ?

And make sure you have moved all the related dependencies of file upload to you test and prod environment.

Thank for the quick response.  But my problem is that there is no error, the picture should just appear after the upload but does not in Production.  After button click the picture shows in Developent but not in Prod.  Shee images.Deveploer vs Production

Here is how I display the picture:  

Here is how I save the picture to the Database:

Regarding the dependencies of File upload I'm not sure what dependencies that are.  Thought it is part of the Traditional Web.

Hi Viktor,

From the Images it seems like implementation is fine, have you check the service studio for checking if any error is showing regarding the same?

Also please debug the process and try to check if you the binary data has been inserted into database or not? 

Hello Viktor.

The browser is trying to load the image but is not being able to.
So, the first thing, I would open the Developer tools and inspect if I have any message in the console or Network that explains why is that.

After that, I would ask the infrastructure guys to take a look at the difference in the Content Policy of each environment:

This may be a problem of different configurations and the Quality and Production environments have some rule that is preventing the images from being loaded.

After that, I would ask if there is anything different between the environments like proxies, firewalls and so on, that could also be blocking the image loading by the browser.


Again thanks for the responses.

Nitish Kumar I've checked ServiceCenter and Studio and there are no errors or warnings.  Because the upload is working on the Developer part of the web. I'm not sure if I can debug the application on the Production Environment if that is possible please provide me with information.

Eduardo Jauch when you say the infrastructure guys are you talking about that I need to start a case with Outsystems? I have control over the LifeTime application and ServiceCenter an I see that the Content Security Policy is off for all the environments and I dont see any difference between environments.

We are using firewall and VPN so maybe that is the reason.  Is there any way for me to check if the Entity in the Production has the uploaded image ?

To see if the entity has the data, just open Service Studio in Quality or Production and in the Data Tab select the entity and click in View Data option in the context menu. If the image is there, you will see the record and the binary attribute will be different than 0.

If it is not a matter of Content Policy and the data is in the entity, I would still take a look in the browser to see why the image was not found, and for sure would check if the firewall/proxy is blocking this content.

If the image is not in the database, but this works in the Dev environment, could also be something blocking the upload, from the Firewall or proxy, for example, or could be something related to outdated references if you have things in different modules and not everything is being passed to quality and/or production...

I don't seem to be able to see the Enity.

I don't have so many modules and they are up to date.  So this is probably something to do with the Firewall.  Not the first time he is making my hair turn grey!

Guess I have to call some specialist regarding my firewall or try some other way in wath I' trying to complish.

Again and again thank you guys for giving your time to help me out

Sorry, I forgot about this... :(
The preview does not work on Production. Nor the Test of the SQL.

You could implement a page to show a list of records of that entity and show the Binary Size (with the function from the Binary API).

Production troubleshooting is always complicated, so as in the quality environment this is also happening, I would test on it.

Another thing you could do is to Download the stored image to see if it gives you a correct file...