We were storing a bunch of byte data in strings in our UDCodes table to recompile into images. At the time we didn’t want to store them directly on our server. UDCodes table is starting to cause issues with backups and restores for our test instance, and generally speed went down after our move to a managed instance of sql. So we decided we wanted to store them on the server instead of in the table.
The screen has some other functions that we don’t have bandwidth to move to a kinetic style at the moment - so I was going to add the File Transfer service the way I did in a BPM recently.
However - I can’t find a way to call CallService, and read a article saying I may need to bring the dll into the client’s folder?
Can’t do this directly since it’s abstract Ice.Contracts.FileTransferSvcContract fileHandler = new Ice.Contracts.FileTransferSvcContract();
I don’t tend to use Lamda expressions so not sure if there’s a clever way I can write one to handle what I’m trying?
(going to make a configurable path for this too if I have time)
Later down the script I’m just trying to do:
Tldr; How did you all handle using FileTransfer in classic customizations? Is there an assembly I can bring in to use either CallService or some variant, or an expression to use FileTransferSvcContract directly?
Is this a new feature I don’t remember it telling me which to use before…
The type ‘Ice.Lib.IFileTransfer’ is defined in an assembly that is not referenced. You must add a reference to assembly 'Ice.Lib.IFileTransfer, Version=4.3.100.0
Looks like they take two paths rather than bytes in the Upload function. Still working on the declaration since it says doesn’t contain a constructor with 0 arguments.
When I tried to bring those in earlier and use the UploadFile it was telling me Ice.Lib. didn’t contain it and same with Ice.Contracts. That said, I don’t recall if I was trying to use the SvcContract, like in my BPM, or not.
Guessing yours works too?
I ended up doing Ice.Lib.FileTransfer xyz = new Ice.Lib.FileTransfer(); and it told me that I needed to bring in Ice.Lib.IFileTransfer so I brought it in as a custom reference.
The type ‘Ice.Lib.IFileTransfer’ is defined in an assembly that is not referenced. You must add a reference to assembly 'Ice.Lib.IFileTransfer, Version=4.3.100.0
After I brought it in, it let me create the object with Ice.Lib.FileTransfer. I kind of like this version more since it doesn’t take bytes so one less line of code haha
I have Ice.Lib.FileTransfer.dll & Ice.Contracts.Lib.FileTransfer.dll
and I still get
The type ‘Ice.Lib.IFileTransfer’ is defined in an assembly that is not referenced. You must add a reference to assembly 'Ice.Lib.IFileTransfer, Version=4.3.100.0