Re: Inserting content and metadata separately with FCP?
Matthew Toseland <toad-EI5O+8PHWbJeeLb3ft/[email protected]>
| Newsgroups | gmane.network.freenet.technical |
|---|---|
| Message-ID | <[email protected]> |
Okay so the basic problem here is that ClientPutComplexDir doesn't allow
setting MIME types? We can fix that...
https://bugs.freenetproject.org/view.php?id=2672
Sorry that this will not be addressed immediately ... we have some broken but
potentially very useful code in trunk, and some major problems with the
network at large, and we need to deal with them...
On Friday 31 October 2008 21:25, Dan Stevens wrote:
> Hello all.
>
> I am writing an FCP client in Ruby that keeps track of Freenet keys of
> already inserted files. This way it can save time and only insert new
> files or files that have changed. The thing is, I would like to
> insert file content separately from metadata. i.e., insert the raw
> bytes with one ClientPut, record the resulting key, and then insert a
> small redirect to the content with the equivalent of TargetFilename
> and Metadata.ContentType. This way, if a large file gets renamed,
> only the metadata needs to be reinserted, as it will point to the same
> content key as before.
>
> What I am running into is this: when I do the insert all at once
> ('default mode'), I see (using KeyExplorer) that a small file is
> inserted in 2 chunks: one for the content, and one SimpleManifest.
> This is great, but I would like to be able to do it in 2 steps so I
> can record the content key.
>
> I have tried using ClientPut with TargetFilename and
> Metadata.ContentType and a redirect to the content (for lack of a
> concise and descriptive term I call this 'grover mode').
>
> I have also tried using ClientPutComplexDir with Files.0.Name,
> Files.0.Metadata.ContentType, and Files.0.UploadFrom = a redirect to
> the content ('elmo mode').
>
> Neither of these methods manages to do quite the same thing as the
> all-at-once ClientPut, which seems to create a SimpleManifest that
> includes a content type: grover mode creates 3 separate keys (a
> SimpleManifest, a SingleFileRedirect, and the content), and elmo mode
> creates a SimpleManifest with no ContentType (as indicated by
> http://wiki.freenetproject.org/FCP2p0ClientPutComplexDir, 'redirect'
> form does not even look at Files.X.Metadata.ContentType).
>
> Is there any way to do the same thing that all-at-once ClientPut does
> in 2 steps?
>
> For your KeyExploring pleasure, these are the keys I have created:
>
> Content only:
CHK@iWsZEjAbnRHtd3Bb667YmfYdvjjwRiTPeqLjOgbQ8bQ,7MUhazJcFaj-PSeFyqwLn3yFPUAHQSOgpzL8G2kZaNA,AAIA--8
>
> Default:
CHK@KpxYY6ozE~1TntkRajChhBGoOq~2f-Ja0HG9S3Bz98U,sRsN~02jy-svxJUDj-bbmkQeh6B8p-bR~xPa~WLxaKw,AAIC--8
>
> Grover:
CHK@~AYE2dkIxCn667XGJ~bLq2T4baRFD~U4z38hkqb0DGk,nGvXzX5XsA49a7Q8FD1kTEdKAyJMkq78yjQ2Wt5udYw,AAIC--8
>
> Elmo:
CHK@vCI3knF8oz9KYMbs1CYYms9NUQghfFpWTNSCMK2CaDY,V4vln6lTPjGckCvdiFcCdgeObrRfz7SbG1KvDwrOVm8,AAIC--8
>
> Thanks for any advice you can give,
> - TOGoS
_______________________________________________
Tech mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/tech
signature.asc
(application/pgp-signature, 827 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASRL+vHsvjZi+xPTDAQK28A/+MIskTnAHnkozFTpX6p7q87U36UxAtkCG fe3W5cefwhE9VMU539HFPTDn42qY/2eIwdq/YPiXjLw51CKQgbiU6tuvaH4AQALd 7tFCarm/RugF0L81/86uigNxpLbVzSMzceSJquLTJeFj0s3/6XixJGCa0zZic1Ji 8AEHtRe37DrC5ms94wXjMegtz4ZfoGEXB9Spxl89BuSJl6Yj40j/PZY0bidLLXyZ AHe1xTY5tkR2nZ1rmkLQ/nZAQko25rl1nI2ElsMZXo4bIavsI+aBSS8uyBeC9MNp orJD8tbnaQ4IkJEOpjy0r5qlENjxIutQBX8w6HhMp5bHzTRFyDcnFkUyNI8fTnTA V7IEXWJRpVlJEPAWCvuoskMPBNnl/Fxt9fEpt3wU3JiNYKcRRpTV9TDM6MV+6tV/ clFn1ywjFvzGki3ihi0tvyDZxAa0x+GAQVBLFxPZqNvIwHNSZJeld1dt63WRv5oa oXzYUZGqD9lLssg0QWN3dzpZWU2WD2jE9zOaLYB5pPoDetPbENXrrYnwIgbtlOTy fgMBAX+XJPaSdzSYIXe5C2dFJnNf8nBRXkBLwZOB2sk+ap6B9GHzQgRBkrzBI5Ia 9YLx3530vZXegZ/uZqLRnwAbhNyMJBPs1ydp9cQY/L9n9H6LJxSxKvb5zbIHsla4 xw9NbUc6k6Q= =5jKI -----END PGP SIGNATURE-----