File Upload Users can upload a file which can be accessible through
this field, and optionally indexed as part of the search engine. You can
specify a maximum size for files from 128KB up to 2MB.
However, I can not access the uploaded files via the URL:
http://www.rollbase.com/prod1/servlet/File?dir=data&objDefId=' . $OBJDEF_ID . '&id=' . $recordId . '&name=' . $NAME . '&sessionId=' . $sessionID
When I view the URL in a web browser (after logging into rollbase), the uploaded file can be accessed, however the session id is not allowing access from our php web server.
I also tried logging in via REST API and using that session ID, but it does not work.The getDataField REST API also does appear to be working for uploaded files.
Do you have any suggestions on how I would be able to get access to uploaded files attached to Rollba
$session = curl_init($url);
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_POSTFIELDS, $pdfString);
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($session);
//assume $pdfString is a valid pdf converted into a string
$url = 'http://www.rollbase.com/rest/api/setBinaryData?sessionId='.$sessionID.'&id='.$rbid.'&fieldName=upload&fileName=MyFile.pdf&contentType=application/pdf';