Hi Phil,

On 23 July 2013 18:32, Philip Durbin <philip_dur...@harvard.edu> wrote:
> On Wed, Jul 17, 2013 at 11:14 AM, Philip Durbin
> <philip_dur...@harvard.edu> wrote:
>> 1. Am I doing it wrong by using the col-uri to both create the study
>> and upload example.zip?
>
> After discussing this at http://irclog.iq.harvard.edu/dvn/2013-07-22
> I'm pretty sure I was indeed doing this wrong.
>
> I'm still doing a POST of an Atom entry to a col-uri to create a study.
>
> But now*, to upload example.zip, I'm doing a PUT to the edit-media-uri.

Yup, that's definitely the right way round.  The POST gives you an
object that exists on the server, and then the PUT allows you to
modify the content of that object.

In your previous set-up you were probably overwriting the original
item with the new item rather than adding to it.  The Simple Sword
Server is - as the name suggests - pretty Simple, and it might not
have made that obvious :)

> In the discussion above, the video at
> http://cottagelabs.com/news/intro-to-sword-2 was pointed out to me and
> I've found it very helpful. In fact, I started a public Google Doc
> about it with screenshots, notes, and a table that shows the relevant
> HTTP verbs (GET, POST, PUT, DELETE) mapped to the five URIs that are
> in play (service-document-uri, collection-uri, edit-uri,
> edit-media-uri, statement-uri):
>
> https://docs.google.com/document/d/1oyz3ZTfZA_7FFNpZNaxR6cDJzLXgm3X1ybwUkMQwL1Q/edit?usp=sharing
>
> Comments are certainly welcome. I tried to keep the document generic to SWORD.

That's really great, I'm glad you found it useful.  We had quite a lot
of fun making the video too!

Cheers,

Richard

>
> I still have many questions about SWORD, but I'll keep wrestling.
> Thanks for reading.
>
> Phil
>
> * As of https://github.com/IQSS/dvn/commit/1ba5287
>
> --
> Philip Durbin
> Software Developer for http://thedata.org
> http://www.iq.harvard.edu/people/philip-durbin
>
> ------------------------------------------------------------------------------
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> _______________________________________________
> sword-app-tech mailing list
> sword-app-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sword-app-tech



-- 

Richard Jones,

Founder, Cottage Labs
t: @richard_d_jones, @cottagelabs
w: http://cottagelabs.com

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
sword-app-tech mailing list
sword-app-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sword-app-tech

Reply via email to