download file problem

download file problem

  
hi all,


a few days ago, my company was upgraded the outsystems for 4.2 to 5.1 and all eSpaces/extensions too

after this, in my download process, the downloaded files are corrupt (but in the server, the files are OK) example: corrupt_file1.jpg's and corrupt_file2.jpg's attachment for corrupt file and the file_readbinary.jpg's attachment is my action to download file

my question is: in version 5.1, the File_ReadBinary don't work well? my FileSystem extension is 4.1.0 (before and after upgrade)


Best regards,
Sérgio
Hi Sérgio,

As far as we are aware, there have been no problems with the FileSystem extension in 5.1 - and the version we have to download in your Components section is probably the same you have as well.

Since you are reading a file from the disk, may I suggest seeing if the file that you are reading from the filesystem is correct? Could you also attach it here?

Second, what parameters are you using for the File_ReadBinary action? I don't know them by heart, but it could be something of an encoding issue?

Third, are you getting any exception logged into the Error log? Because it would seem to me that, somehow, the file isn't being read in its entirety - and then, it could either be something on your end, or a bug in the extension code.

This could help us start troubleshooting your issue.

Regards,

Paulo Tavares
Since you are reading a file from the disk, may I suggest seeing if the file that you are reading from the filesystem is correct? Could you also attach it here?

Yes, is/are correct. my test files are in the example_test attachment.




Second, what parameters are you using for the File_ReadBinary action? I don't know them by heart, but it could be something of an encoding issue?

It's a path location file. In my screen, "Configuracoes_GetValue.value" is a destination folder and "NomeFisico" is the file name with extension (.txt, .rtf etc.)





Third, are you getting any exception logged into the Error log? Because it would seem to me that, somehow, the file isn't being read in its entirety - and then, it could either be something on your end, or a bug in the extension code.

I don't get anything in the Error log.




I didn't have any problem before de upgrade with small or larger files (250bytes, 10KB or 4,5MB in my test files)
Hi Sérgio,

Thanks for the prompt reply.

Could you also send me the dowloaded corrupt files? You have previously attached screenshots of you trying to open them; could you send us the corrupted downloads as well?

That will help us trying to determine what the problem is.

Regards,

Paulo Tavares

OK, here it go

Hi Sérgio.

Thanks a lot for the reply. In fact, thanks to the corrupt files, I was able to validate the symptom of the corruption - the corrupted files are truncated versions of the complete files. When you add both file versions to a file comparer, you'll see this:






What can be the cause for this? Well, it's hard to say.

It can be something in the IIS configuration, having the connection break before it should, or it can be a bug in the extension - for that, I would suggest you download the latest version, install it and see if it works better. Also, while you're at it, have you tried restarting IIS?

If it does not, you could always try looking at its code, and see if you can figure something out on your own.

If all else fails, I would suggest you sending this issue to support@outsystems.com, since they'll be better equipped to troubleshoot and fix this problem, in case it's a bug.

Regards,

Paulo Tavares
grrr...the problem is in the button/link method, I have 'Ajax' and it is 'Submit'

well...thanks for all :)


Regards,
Sérgio
Oh... Well, that does it as well! Glad you solved it.

Regards,

Paulo Tavares