...
Status | ||||
---|---|---|---|---|
|
In theory, you can add any file type you want to Giles. However, only file types supported by Digilib or file types that Giles knows how to convert really make sense. Currently, Giles knows how to convert PDFs to images. Giles is globally configurable in regards to what image type it uses and what DPI when converting PDFs to images (default is tiff/600 dpi). Giles will create one image per PDF page and put all images together into one folder so that you can use Digilib's paginator feature. The original PDF is stored separately outside of Digilib's image folder.
You can add files to Giles by making a POST request to:
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "documentId" : "DOCnbxbFU", "uploadId" : "UP50N1AV", "uploadedDate" : "2016-07-26T21:38:34.398Z", "access" : "PRIVATE", "files" : [ { "filename" : "IMG_2836.jpeg", "path" : "http://diging-dev.asu.edu:8081/giles-review/rest/digilib?fn=jdamerow/UP50N1AV/FILEz7JQFu/IMG_2836.jpeg", "content-type" : "image/jpeg", "size" : 120830, "success" : 0, "id" : "FILE2FGTtG" }, { "filename" : "IMG_0306.jpg", "path" : "http://diging-dev.asu.edu:8081/giles-review/rest/digilib?fn=jdamerow/UP50N1AV/FILETAW3KI/IMG_0306.jpg", "content-type" : "image/jpeg", "size" : 270769, "success" : 0, "id" : "FILE23rtG" } ] } ] |
Get image from Digilib
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "documentId" : "DOCDdXVqo", "uploadId" : "UPR8QVBL", "uploadedDate" : "2016-07-25T17:17:04.944Z", "access" : "PRIVATE", "files" : [ { "filename" : "IMG_2836.jpeg", "path" : "http://diging-dev.asu.edu:8081/giles-review/rest/digilib?fn=jdamerow/UPR8QVBL/FILExedxqn/IMG_2836.jpeg", "content-type" : "image/jpeg", "size" : 120830, "id" : "FILE23rtG" } ] } ] |
Get full image from Giles
Status | ||||
---|---|---|---|---|
|
You can get the original version of a file that you have uploaded through Giles by making a GET request to:
/rest/files/{fileId}/content
where {fileId}
is the id of the file you are trying to download.
Giles expects the following parameters:
- accessToken: a github access token that is used to authenticate the uploading user
Note: when requesting information about an upload, or after uploading a file, the path property of the JSON response will point here for PDF files.