You need to sign in to do that
Don't have an account?

Drag and Drop..upload file into Feeditem content..Please help
HI i am trying to use drag and drop for uploading file into content. Below code works for attachment
When i tried to change it Feeditem object it doesn't work.Please tell me if the url is wrong or anything else i am doing wrong.
sfdcurl = '/services/data/v27.0/sobjects/Attachment/';
When i tried to change it Feeditem object it doesn't work.Please tell me if the url is wrong or anything else i am doing wrong.
sfdcurl = '/services/data/v27.0/sobjects/Feeditem/';
<script> var curPopupWindow = []; var headersData = {}; headersData["Authorization"] = "Bearer {!$Api.Session_ID}"; sfdcurl = '/services/data/v27.0/sobjects/Feeditem/'; Dropzone.autoDiscover = false; var myDropzone = new Dropzone("div#dropzone-email-dropable", { maxFiles: 25, url: sfdcurl, addRemoveLinks:true, dictCancelUpload:"Cancel Upload", dictCancelUploadConfirmation:"Are You Sure?", dictRemoveFile:"Remove", parallelUploads:2, filesizeBase:1024, maxFilesize:10, //autoProcessQueue:false, //params: {"ParentId" : "{!contentFolderId}","Description" : "{!sessionId}"}, params: {"ParentId" : "{!contentFolderId}"}, headers: headersData, init: function () { this.on("maxfilesexceeded", function (data) { var res = eval('(' + data.xhr.responseText + ')'); }); this.on("removedfile", function (file) { console.log(file.uploadId); this.deleteFile(file,this.options.url); //refreshAttachments(); }); this.on("success", function (file,resp) { file.uploadId = resp.id; //refreshAttachments(); }); } }); console.log({!success}); </script>
If fixing the case doesn't work, try debugging the javascript (using the browser's developer console and debugger; statements for example) to see if there's anything out of the ordinary there.
Good luck!
I tried debugging the javascript
Anything else you can suggest.??? Its urgent :(
Its been 3 hours
Failed to load resource: the server responded with a status of 400 (Bad Request)
If that doesn't help, and I could be wrong here, but I think Feed Items and other Chatter related objects now only come back via the "Connect API". Meaning you can still fetch them using the REST API, it's just a different end point. For Feed Items, this would resemble the following:
Unfortunately, the feed-elements URI needs a query parameter, so you'll need to specify that in your string. And it may or may not return all the information you're looking for, otherwise you're potentially looking at additional connect api calls.
I am still facint he exact same issue.
Authorization Bearer should eb correct as below is working and i am able to upload file to atachment object..
Any more suggestions.?