Java API

8 views
Skip to first unread message

Luzius

unread,
Nov 5, 2007, 7:09:20 AM11/5/07
to DivShare API Developers
I've just created a small Java library to access the Divshare API.
Some functions do not work yet (uploading images, for example fails
for mysterious reasons while uploading the same files renamed to .txt
succeeds), but if anyone is interested in the library, you can
download it from:
http://www.divshare.com/download/2640707-61e
I'll also send an email to support, maybe they know why image uploads
fail.

Luzius

unread,
Nov 5, 2007, 7:31:44 AM11/5/07
to DivShare API Developers
I've found the problem with the image uploads: divshare does not allow
uploading images with content-type set to "application/octet-stream".

Rob Howard, DivShare

unread,
Nov 5, 2007, 11:28:15 AM11/5/07
to DivShare API Developers
Hi Luzius,

The system should recognize images with the content type of
application/octet-stream -- is the problem that the files can't be
uploaded, or that they're just not recognized as images once they're
on the site?

Rob

Luzius

unread,
Nov 6, 2007, 4:12:38 AM11/6/07
to DivShare API Developers
Hi Rob

The uploads seems to succeed with "application/octet-stream", but the
system can't find the images when trying to download them (e.g.
http://www.divshare.com/download/2652417-24d). I've fixed the issue by
providing the correct content-type (using Java's
MimeTable.getDefaultTable().getContentTypeFor(filename)).
An updated version of the source code can be found at:
http://www.divshare.com/download/2652475-991

Luzius

Luzius

unread,
Nov 6, 2007, 4:39:17 AM11/6/07
to DivShare API Developers
Turns out I've posted the link to the wrong jar file, here's the
correct one:
http://www.divshare.com/download/2652675-ec5

On Nov 6, 10:12 am, Luzius <luzius.meis...@gmail.com> wrote:
> Hi Rob
>
> The uploads seems to succeed with "application/octet-stream", but the

> system can't find the images when trying to download them (e.g.http://www.divshare.com/download/2652417-24d). I've fixed the issue by

Reply all
Reply to author
Forward
0 new messages