File uploads cannot be removed in portals

Posted by Rollbase User on 10-Jul-2012 10:49

When using file upload fields in portals, users are not able to remove the files they upload. When clicking the "Remove" link, the following javascript error is thrown: Uncaught ReferenceError: rbf_doRemoveFileConfirmed is not defined. What can we do to fix this?

All Replies

Posted by Admin on 10-Jul-2012 11:49

We'll fix that.

Posted by Admin on 10-Jul-2012 11:54

in progress

Posted by Admin on 13-Jul-2012 17:14

Where is no "Remove" link for portals - where do you see it?

Posted by Admin on 13-Jul-2012 17:30

This works fine in 3.6.9



Please find rbf_doRemoveFileConfirmed in main.js

Posted by Admin on 30-Jul-2012 16:12

I found rbf_doRemoveFileConfirmed in main.js from the latest edition of Rolbase, but it doesn't work to simply drop it in. In the latest edition, rbf_doRemoveFileConfirmed requires 4 parameters just like rbf_doRemoveFile. I've tried to hack it together, but it's not working. When I output and manually visit the URL that the AJAX request is using, I get the login page. I've verified that the Query API has full access to the object that I'm working with. The code that I'm using is below.



function rbf_doRemoveFile(pageId, etin, idin, inName) {

if(confirm("Are you sure you want to remove this file?")) {

rbf_doRemoveFileConfirmed(etin,idin,inName,pageId);

}

}



function rbf_doRemoveFileConfirmed(objName,id,fieldName,destId) {

var ajaxRreq=rbf_getXMLHTTPRequest();

if(!ajaxRreq)

return false;

ajaxRreq.onreadystatechange=function(){

if(ajaxRreq.readyState==READY_STATE_COMPLETE){

uFileDiv=document.getElementById(fieldName+'u_File');

if(uFileDiv.hasChildNodes()){

Posted by Admin on 30-Jul-2012 16:18

I verified that it works in the admin side, so it must be a permissions issue. Do you have any tips which permission needs to be enabled for use in a portal?

Posted by Admin on 30-Jul-2012 16:28

Both Record Creator and the Query API have full permissions for the object I'm working with.

Posted by Admin on 31-Jul-2012 12:10

This will be fixed in the next release (3.7.2)

This thread is closed