Thank you, and one more q: can I specify a folder/share for the uploaded file, assuming there are several available?
On Tue, May 31, 2011 at 7:41 PM, Daniel Pittman <[email protected]>wrote: > On Tue, May 31, 2011 at 07:21, RCosma <[email protected]> wrote: > > Hello, > > I am a bit confused by the REST syntax - how can I PUT an arbitrary file > in > > the bucket? Downloading works fine (Perl+LWP), see below, but for PUT I > only > > see this line in the docs ( > http://docs.puppetlabs.com/guides/rest_api.html): > > PUT /{environment}/file_bucket_file/md5/{checksum} > > Should I compute the MD5 of the file and port its contents at the url ? > > Yeah, you would need to: the indirector, which this is an instance of, > requires that you uniquely identify where you are writing to. So, in > the case of the filebucket the "key" is that MD5 checksum; you would > need to calculate it for the file and supply it. > > There is no support in the indirector for uploading the data with the > server calculating the checksum. > > (As a side note, I don't think we actually *check* you were honest > about that, other than when the target checksum already exists, so > please try not to lie about it. ;) > > Daniel > -- > ⎋ Puppet Labs Developer – http://puppetlabs.com > ✉ Daniel Pittman <[email protected]> > ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 > ♲ Made with 100 percent post-consumer electrons > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
