Show / Hide Table of Contents
Edit on GitHub

Referencing files - Amplia Reg

There are multiple ways to reference files when calling Amplia Reg's APIs, for instance when creating a preapproved order.

.NET

You can reference a file by its path:

var fileRef = FileReference.FromFile(@"C:\AppData\Documents\document.pdf");

By a FileInfo containing the file's path:

var fileInfo = new FileInfo(@"C:\AppData\Documents\document.pdf");
var fileRef = FileReference.FromFile(fileInfo);

By the file's bytes, in which case you must also give its filename:

byte[] bytes = ...;
var fileRef = FileReference.FromBytes(bytes, "document.pdf");

By a stream. Like when referencing by the file's bytes, the filename must also be given:

var fileRef = FileReference.FromStream(stream, "document.pdf");
Back to top Copyright © 2015-2020 Lacuna Software