[DG: User Experience] Uploading files through REST services in order to create content for user/group library

classic Classic list List threaded Threaded
7 messages Options
William Thivierge William Thivierge
Reply | Threaded
Open this post in threaded view
|

[DG: User Experience] Uploading files through REST services in order to create content for user/group library

Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.

_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
William Thivierge William Thivierge
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.


_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
William Thivierge William Thivierge
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Also i figured i could post the .members.tidy.json result:

{
  "managers": [{
      "basic": {
        "access": "everybody",
        "elements": {
          "lastName": {
            "value": "User"
          },
          "email": {
            "value": "[hidden email]"
          },
          "firstName": {
            "value": "Anonymous"
          }
        }
      },
      "rep:userId": "anonymous"
    }
  ],
  "editors": [
  ],
  "viewers": [
  ]
}

I can see in the code directly that its supposed to find the user by the session which i guess does not since sakai:pool-content-created-for = "anonymous" But i'll keep on trying to figure out what is up with that.
2012/9/13 William Thivierge <[hidden email]>
Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.



_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
William Thivierge William Thivierge
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Following up : 

I've tried to addMembers as managers to the file using {poolId}.members.html but i got an access denied error. I guess it is because i should already be a manager and can't modify members of it.

13.09.2012 22:50:32.102 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] -> POST /p/mCukapqVaa.members.html HTTP/1.1
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.139 *ERROR* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mCukapqVaa.members.html: not allowed to add or modify item 
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] <- 500 text/html 38ms
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:32 -0400 "POST /p/mCukapqVaa.members.html HTTP/1.1" 500 1529 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"
13.09.2012 22:50:32.141 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 1 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39, time remaining for this batch 0
13.09.2012 22:50:32.147 *INFO* [Thread-3685] org.sakaiproject.nakamura.activity.routing.PublicActivityRouter Routing activity from path mCukapqVaa/activity/2012-09-13-22-44952cb3c33fc21415b751ac2ad94c2a165b798a; anon canRead = true
13.09.2012 22:50:32.149 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processed 1 events in a batch, max 10, TTL -8, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39  
13.09.2012 22:50:36.072 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 9 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694, time remaining for this batch 0
13.09.2012 22:50:36.091 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processed 9 events in a batch, max 100, TTL -19, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694  
13.09.2012 22:50:52.735 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] -> GET /system/me?_charset_=utf-8 HTTP/1.1
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] <- 200 application/json 19ms
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:52 -0400 "GET /system/me?_charset_=utf-8 HTTP/1.1" 200 19776 "http://localhost:8080/me" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"


2012/9/13 William Thivierge <[hidden email]>
Also i figured i could post the .members.tidy.json result:

{
  "managers": [{
      "basic": {
        "access": "everybody",
        "elements": {
          "lastName": {
            "value": "User"
          },
          "email": {
            "value": "[hidden email]"
          },
          "firstName": {
            "value": "Anonymous"
          }
        }
      },
      "rep:userId": "anonymous"
    }
  ],
  "editors": [
  ],
  "viewers": [
  ]
}

I can see in the code directly that its supposed to find the user by the session which i guess does not since sakai:pool-content-created-for = "anonymous" But i'll keep on trying to figure out what is up with that.

2012/9/13 William Thivierge <[hidden email]>
Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.




_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
Nicolaas Matthijs Nicolaas Matthijs
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Hi William,

It sounds like you've been able to figure most of this out on your own, but here are some additional pointers:

1) In order to create a new pooled content item, you send a POST request to /system/pool/createfile. The response of that request will be a JSON object, formatted in the following way:

{
    "_contentItem": {
        "poolId": "mFv99rOSw",
        "item": {
            "_lastModifiedBy": "admin",
            "sakai:preview-type": "iframe",
            "_mimeType": "x-sakai/link",
            "commentCount": 0,
            "_createdBy": "admin",
            "sakai:preview-url": "http://www.google.co.uk",
            "_path": "mFv99rOSw",
            "sling:resourceType": "sakai/pooled-content",
            "sakai:pooled-content-manager": [
                "nicolaas"
            ],
            "_created": 1347629625037,
            "sakai:pool-content-created-for": "nicolaas",
            "_id": "zmVn0P5wEeG_1LnoRaTSfQ+",
            "_lastModified": 1347629625037,
            "sakai:pooled-content-url": "http://www.google.co.uk"
        }
    }
}

_contentItem.poolId gives you the unique pool id of the content you have just created. 

_contentItem.item will contain the profile information of the content you have just created. This will be the same as what you see when requesting the content profile at /p/<poolId>.json.


2) In order to add a manager or member to the content, you can do a POST request to /p/<poolId>.members.json. The parameters you pass in are ":manager=<user/group id>" if you want to make someone a manager or ":member=<user/group id>" if you want to make someone a member.

If you want to make multiple people manager/member at the same time, you can pass in an array of :manager and/or :member parameters.

In order for this request to be successful, the current user has to be a manager of the piece of content.


Hope that helps,
Nicolaas



On 14 Sep 2012, at 03:55, William Thivierge wrote:

Following up : 

I've tried to addMembers as managers to the file using {poolId}.members.html but i got an access denied error. I guess it is because i should already be a manager and can't modify members of it.

13.09.2012 22:50:32.102 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] -> POST /p/mCukapqVaa.members.html HTTP/1.1
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.139 *ERROR* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mCukapqVaa.members.html: not allowed to add or modify item 
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] <- 500 text/html 38ms
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:32 -0400 "POST /p/mCukapqVaa.members.html HTTP/1.1" 500 1529 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"
13.09.2012 22:50:32.141 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 1 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39, time remaining for this batch 0
13.09.2012 22:50:32.147 *INFO* [Thread-3685] org.sakaiproject.nakamura.activity.routing.PublicActivityRouter Routing activity from path mCukapqVaa/activity/2012-09-13-22-44952cb3c33fc21415b751ac2ad94c2a165b798a; anon canRead = true
13.09.2012 22:50:32.149 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processed 1 events in a batch, max 10, TTL -8, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39  
13.09.2012 22:50:36.072 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 9 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694, time remaining for this batch 0
13.09.2012 22:50:36.091 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processed 9 events in a batch, max 100, TTL -19, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694  
13.09.2012 22:50:52.735 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] -> GET /system/me?_charset_=utf-8 HTTP/1.1
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] <- 200 application/json 19ms
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:52 -0400 "GET /system/me?_charset_=utf-8 HTTP/1.1" 200 19776 "http://localhost:8080/me" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"


2012/9/13 William Thivierge <[hidden email]>
Also i figured i could post the .members.tidy.json result:

{
  "managers": [{
      "basic": {
        "access": "everybody",
        "elements": {
          "lastName": {
            "value": "User"
          },
          "email": {
            "value": "[hidden email]"
          },
          "firstName": {
            "value": "Anonymous"
          }
        }
      },
      "rep:userId": "anonymous"
    }
  ],
  "editors": [
  ],
  "viewers": [
  ]
}

I can see in the code directly that its supposed to find the user by the session which i guess does not since sakai:pool-content-created-for = "anonymous" But i'll keep on trying to figure out what is up with that.

2012/9/13 William Thivierge <[hidden email]>
Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.



_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"


_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
William Thivierge William Thivierge
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Hi Nicolaas,

I can see that following a POST request to /system/pool/createfile you have

"sakai:pooled-content-manager": ["nicolaas"],
"sakai:pool-content-created-for": "nicolaas",
While i get :  
"sakai:pooled-content-manager":["anonymous"],
"sakai:pool-content-created-for":"anonymous",

Most likely the reason trying to modify members result in :
org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mFaAKaIKs.members.json: not allowed to add or modify item 

It feels like the session is not discovered for some reason. Digging into the server side code to figure out why /system/me works but not  /system/pool/createfile

Thanks a lot for your time

2012/9/14 Nicolaas Matthijs <[hidden email]>
Hi William,

It sounds like you've been able to figure most of this out on your own, but here are some additional pointers:

1) In order to create a new pooled content item, you send a POST request to /system/pool/createfile. The response of that request will be a JSON object, formatted in the following way:

{
    "_contentItem": {
        "poolId": "mFv99rOSw",
        "item": {
            "_lastModifiedBy": "admin",
            "sakai:preview-type": "iframe",
            "_mimeType": "x-sakai/link",
            "commentCount": 0,
            "_createdBy": "admin",
            "sakai:preview-url": "http://www.google.co.uk",
            "_path": "mFv99rOSw",
            "sling:resourceType": "sakai/pooled-content",
            "sakai:pooled-content-manager": [
                "nicolaas"
            ],
            "_created": 1347629625037,
            "sakai:pool-content-created-for": "nicolaas",
            "_id": "zmVn0P5wEeG_1LnoRaTSfQ+",
            "_lastModified": 1347629625037,
            "sakai:pooled-content-url": "http://www.google.co.uk"
        }
    }
}

_contentItem.poolId gives you the unique pool id of the content you have just created. 

_contentItem.item will contain the profile information of the content you have just created. This will be the same as what you see when requesting the content profile at /p/<poolId>.json.


2) In order to add a manager or member to the content, you can do a POST request to /p/<poolId>.members.json. The parameters you pass in are ":manager=<user/group id>" if you want to make someone a manager or ":member=<user/group id>" if you want to make someone a member.

If you want to make multiple people manager/member at the same time, you can pass in an array of :manager and/or :member parameters.

In order for this request to be successful, the current user has to be a manager of the piece of content.


Hope that helps,
Nicolaas



On 14 Sep 2012, at 03:55, William Thivierge wrote:

Following up : 

I've tried to addMembers as managers to the file using {poolId}.members.html but i got an access denied error. I guess it is because i should already be a manager and can't modify members of it.

13.09.2012 22:50:32.102 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] -> POST /p/mCukapqVaa.members.html HTTP/1.1
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.139 *ERROR* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mCukapqVaa.members.html: not allowed to add or modify item 
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] <- 500 text/html 38ms
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:32 -0400 "POST /p/mCukapqVaa.members.html HTTP/1.1" 500 1529 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"
13.09.2012 22:50:32.141 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 1 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39, time remaining for this batch 0
13.09.2012 22:50:32.147 *INFO* [Thread-3685] org.sakaiproject.nakamura.activity.routing.PublicActivityRouter Routing activity from path mCukapqVaa/activity/2012-09-13-22-44952cb3c33fc21415b751ac2ad94c2a165b798a; anon canRead = true
13.09.2012 22:50:32.149 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processed 1 events in a batch, max 10, TTL -8, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39  
13.09.2012 22:50:36.072 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 9 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694, time remaining for this batch 0
13.09.2012 22:50:36.091 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processed 9 events in a batch, max 100, TTL -19, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694  
13.09.2012 22:50:52.735 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] -> GET /system/me?_charset_=utf-8 HTTP/1.1
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] <- 200 application/json 19ms
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:52 -0400 "GET /system/me?_charset_=utf-8 HTTP/1.1" 200 19776 "http://localhost:8080/me" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"


2012/9/13 William Thivierge <[hidden email]>
Also i figured i could post the .members.tidy.json result:

{
  "managers": [{
      "basic": {
        "access": "everybody",
        "elements": {
          "lastName": {
            "value": "User"
          },
          "email": {
            "value": "[hidden email]"
          },
          "firstName": {
            "value": "Anonymous"
          }
        }
      },
      "rep:userId": "anonymous"
    }
  ],
  "editors": [
  ],
  "viewers": [
  ]
}

I can see in the code directly that its supposed to find the user by the session which i guess does not since sakai:pool-content-created-for = "anonymous" But i'll keep on trying to figure out what is up with that.

2012/9/13 William Thivierge <[hidden email]>
Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.



_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"



_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"
Nicolaas Matthijs Nicolaas Matthijs
Reply | Threaded
Open this post in threaded view
|

Re: [DG: User Experience] Uploading files through REST services in order to create content for user/group library

Hi William,

The system should automatically add the current user as the manager of the content. Were you using the admin account to create this content? In general, we don't support that and there might be an issue with that. However, with a proper user, it should work.

The second error is definitely caused by the fact that anonymous is the content manager.

Hope that helps,
Nicolaas


On 14 Sep 2012, at 17:02, William Thivierge wrote:

Hi Nicolaas,

I can see that following a POST request to /system/pool/createfile you have

"sakai:pooled-content-manager": ["nicolaas"],
"sakai:pool-content-created-for": "nicolaas",
While i get :  
"sakai:pooled-content-manager":["anonymous"],
"sakai:pool-content-created-for":"anonymous",

Most likely the reason trying to modify members result in :
org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mFaAKaIKs.members.json: not allowed to add or modify item 

It feels like the session is not discovered for some reason. Digging into the server side code to figure out why /system/me works but not  /system/pool/createfile

Thanks a lot for your time

2012/9/14 Nicolaas Matthijs <[hidden email]>
Hi William,

It sounds like you've been able to figure most of this out on your own, but here are some additional pointers:

1) In order to create a new pooled content item, you send a POST request to /system/pool/createfile. The response of that request will be a JSON object, formatted in the following way:

{
    "_contentItem": {
        "poolId": "mFv99rOSw",
        "item": {
            "_lastModifiedBy": "admin",
            "sakai:preview-type": "iframe",
            "_mimeType": "x-sakai/link",
            "commentCount": 0,
            "_createdBy": "admin",
            "sakai:preview-url": "http://www.google.co.uk",
            "_path": "mFv99rOSw",
            "sling:resourceType": "sakai/pooled-content",
            "sakai:pooled-content-manager": [
                "nicolaas"
            ],
            "_created": 1347629625037,
            "sakai:pool-content-created-for": "nicolaas",
            "_id": "zmVn0P5wEeG_1LnoRaTSfQ+",
            "_lastModified": 1347629625037,
            "sakai:pooled-content-url": "http://www.google.co.uk"
        }
    }
}

_contentItem.poolId gives you the unique pool id of the content you have just created. 

_contentItem.item will contain the profile information of the content you have just created. This will be the same as what you see when requesting the content profile at /p/<poolId>.json.


2) In order to add a manager or member to the content, you can do a POST request to /p/<poolId>.members.json. The parameters you pass in are ":manager=<user/group id>" if you want to make someone a manager or ":member=<user/group id>" if you want to make someone a member.

If you want to make multiple people manager/member at the same time, you can pass in an array of :manager and/or :member parameters.

In order for this request to be successful, the current user has to be a manager of the piece of content.


Hope that helps,
Nicolaas



On 14 Sep 2012, at 03:55, William Thivierge wrote:

Following up : 

I've tried to addMembers as managers to the file using {poolId}.members.html but i got an access denied error. I guess it is because i should already be a manager and can't modify members of it.

13.09.2012 22:50:32.102 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] -> POST /p/mCukapqVaa.members.html HTTP/1.1
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.105 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.128 *WARN* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.sakaiproject.nakamura.files.pool.ContentPoolProvider Denied dude on CO:mCukapqVaa  performing Read
13.09.2012 22:50:32.139 *ERROR* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied /p/mCukapqVaa.members.html: not allowed to add or modify item 
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/request.log 13/Sep/2012:22:50:32 -0400 [718] <- 500 text/html 38ms
13.09.2012 22:50:32.140 *INFO* [127.0.0.1 [1347591032102] POST /p/mCukapqVaa.members.html HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:32 -0400 "POST /p/mCukapqVaa.members.html HTTP/1.1" 500 1529 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1"
13.09.2012 22:50:32.141 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 1 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39, time remaining for this batch 0
13.09.2012 22:50:32.147 *INFO* [Thread-3685] org.sakaiproject.nakamura.activity.routing.PublicActivityRouter Routing activity from path mCukapqVaa/activity/2012-09-13-22-44952cb3c33fc21415b751ac2ad94c2a165b798a; anon canRead = true
13.09.2012 22:50:32.149 *INFO* [IndexQueueManager-high] org.sakaiproject.nakamura.solr.QueueManager Processed 1 events in a batch, max 10, TTL -8, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq-high\1347561428396:39  
13.09.2012 22:50:36.072 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processing a batch of 9 items, redolog at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694, time remaining for this batch 0
13.09.2012 22:50:36.091 *INFO* [IndexQueueManager] org.sakaiproject.nakamura.solr.QueueManager Processed 9 events in a batch, max 100, TTL -19, queue at C:\Users\wthivierge\workspaceSakaJohn\base\sling\solr\indexq\1347554969873:694  
13.09.2012 22:50:52.735 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] -> GET /system/me?_charset_=utf-8 HTTP/1.1
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/request.log 13/Sep/2012:22:50:52 -0400 [719] <- 200 application/json 19ms
13.09.2012 22:50:52.753 *INFO* [127.0.0.1 [1347591052734] GET /system/me HTTP/1.1] logs/access.log 127.0.0.1 - dude 13/Sep/2012:22:50:52 -0400 "GET /system/me?_charset_=utf-8 HTTP/1.1" 200 19776 "http://localhost:8080/me" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1"


2012/9/13 William Thivierge <[hidden email]>
Also i figured i could post the .members.tidy.json result:

{
  "managers": [{
      "basic": {
        "access": "everybody",
        "elements": {
          "lastName": {
            "value": "User"
          },
          "email": {
            "value": "[hidden email]"
          },
          "firstName": {
            "value": "Anonymous"
          }
        }
      },
      "rep:userId": "anonymous"
    }
  ],
  "editors": [
  ],
  "viewers": [
  ]
}

I can see in the code directly that its supposed to find the user by the session which i guess does not since sakai:pool-content-created-for = "anonymous" But i'll keep on trying to figure out what is up with that.

2012/9/13 William Thivierge <[hidden email]>
Ok i've figured the information i was looking for was actually in DataEvent.UPLOAD_COMPLETE_DATA

i can get to a point where i have some information to the files i need to get linked Continuing my research

William

Here's the data i can get:

onDataComplete SUCCESS (Object)#0
  5848_123281446580_555541580_2855594_1934089_n.jpg = (Object)#1
    item = (Object)#2
      _blockId = "4vgo4P3zEeGjCjNFwKgAZQ+"
      _bodyCreated = 1347575972464
      _bodyCreatedBy = "admin"
      _bodyLastModified = 1347575972464
      _bodyLastModifiedBy = "admin"
      _bodyLocation = "2012/8/z5/wO/Xw/z5wOXw1EFeuddZFPMmiND0YtSAw"
      _created = 1347575972455
      _createdBy = "admin"
      _id = "4vcXcP3zEeGjCjNFwKgAZQ+"
      _lastModified = 1347575972455
      _lastModifiedBy = "admin"
      _length = 34636
      _mimeType = "image/jpeg"
      _path = "mzrvIc2mie"
      sakai:needsprocessing = "true"
      sakai:pool-content-created-for = "anonymous"
      sakai:pooled-content-file-name = "5848_123281446580_555541580_2855594_1934089_n.jpg"
      sakai:pooled-content-manager = (Array)#3
        [0] "anonymous"
      sling:resourceType = "sakai/pooled-content"
    poolId = "mzrvIc2mie"


2012/9/13 William Thivierge <[hidden email]>
Hello sakai devs.

I have sent this to aoe-dev first but i think this is more of a ux question

I'm trying to achieve a deep intregration with sakai and our home-brew virtual classroom application. In order to do so we'd like to be able to create content from our end that will find itself in sakai as well as consume content from sakai to present in live classrooms.

We have easily integrated users/group/messages but currently cannot achieve uploading content to a library.

We've been successful in sending file to /system/pool/createfile but afterwards the file poolid is unavailable from the answer and the relation between a group and a file is still unknown to us.

Can anybody point to us the process in creating a file where we could maybe preset a file poolid and use the service in this form : /system/pool/createfile.3sd23a4QW4WD or another way in which we could achieve this goal.

Since it uses video/audio and RTMP for server pushes our platform makes call from actionscript. 

We previously tryed to get store.upload.json but we get an Access Denied Error

13.09.2012 16:52:52.177 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] -> POST /store.upload.json HTTP/1.1
13.09.2012 16:52:52.210 *ERROR* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] org.apache.sling.servlets.post.impl.operations.ModifyOperation Access Denied Access denied. 
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/request.log 13/Sep/2012:16:52:52 -0400 [403] <- 500 text/html 34ms
13.09.2012 16:52:52.211 *INFO* [127.0.0.1 [1347569572177] POST /store.upload.json HTTP/1.1] logs/access.log 127.0.0.1 - anonymous 13/Sep/2012:16:52:52 -0400 "POST /store.upload.json HTTP/1.1" 500 1357 "-" "Shockwave Flash"

Thanks a lot for your time.  

This platform is intended to be fully open Source, is currently built on the latest flex SDK using robotlegs 2 Covariant mediation in order to provide a tablet/mobile application as well. All FOSS.



_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"




_______________________________________________
sakai-ux mailing list
[hidden email]
http://collab.sakaiproject.org/mailman/listinfo/sakai-ux

TO UNSUBSCRIBE: send email to [hidden email] with a subject of "unsubscribe"