public string Create(Stream data) { if (_provider != null) { _url = _provider.Upload(_name, data, FileTypeAtt); return(_name); } return(string.Empty); }
public bool Upload(string filefullpath, string storageobjectfullname, GxFile uploadedFile, GXBaseCollection <SdtMessages_Message> messages) { try { ValidProvider(); if (String.IsNullOrEmpty(storageobjectfullname)) { storageobjectfullname = Path.GetFileName(filefullpath); } string url = provider.Upload(filefullpath, storageobjectfullname, GxFileType.Public); uploadedFile.FileInfo = new GxExternalFileInfo(storageobjectfullname, url, provider); return(true); } catch (Exception ex) { StorageMessages(ex, messages); return(false); } }