lib/QuickBaseClient.rb in quickbase_client-1.0.16 vs lib/QuickBaseClient.rb in quickbase_client-1.0.17

- old
+ new

@@ -1940,11 +1940,11 @@ # API_CopyMasterDetail def copyMasterDetail( dbid, destrid, sourcerid, copyfid = nil, recurse = nil, relfids = nil ) raise "copyfid must be specified when destrid is 0." if destrid == "0" and copyfid.nil? - + @dbid, @destrid, @sourcerid, @copyfid, @recurse, @relfids = dbid, destrid, sourcerid, copyfid, recurse, relfids xmlRequestData = toXML( :destrid, @destrid) xmlRequestData << toXML( :sourcerid, @sourcerid ) xmlRequestData << toXML( :copyfid, @copyfid ) if @copyfid @@ -4528,9 +4528,14 @@ # Upload a file into a new record in the active table. # e.g. uploadFile( "contacts.txt", "Contacts File" ) def _uploadFile( filename, fileAttachmentFieldName ) uploadFile( @dbid, filename, fileAttachmentFieldName ) + end + + # Get the URL string for downloading a file from a File Attachment field + def getFileDownloadURL(dbid, rid, fid, vid = "0",org="www",domain="quickbase",ssl="s") + "http#{ssl}://#{org}.#{domain}.com/up/#{dbid}/a/r#{rid}/e#{fid}/v#{vid}" end # Update the file attachment in an existing record in a table. # Additional field values can optionally be set. # e.g. updateFile( "dhnju5y7", "6", "contacts.txt", "Contacts File", { "Notes" => "#{Time.now}" }