Summary
SOP app cannot access scan data if the panel user is NOT the scan job user. Temporary scan data is deleted 15 minutes after the last access.
Symptom
In the situation when there are multiple users and various small scans are performed following a large scan: scan files may be deleted, or inaccessible by the panel user privilege.
Cause
The scan file stored by jobMode="scan_and_store_temporary" or using Ricoh ScanGUIService become inaccessible after a user logs out. If you are using the below
Changes to ScanGUIService sample application
This is based on ScanGUIService sample application MainActivity.java.
This code demonstrates
- Move the temporary file to application HDD area.
- Files in the application directories are always readable by the app.
The app can read/write even after the panel user logs out.
This is only a demonstration level. Known limitations (not complete) are:
- No nice error checks; file exist checks, file name checks, file move error handlings, HDD size check,
- No file erase – Please add the logic to delete file when the app is done with the file.
- Locks for HDD usage are not implemented. The locks must be added to surround file read and delete steps.
- File format (TIFF/JPEG/PDF) and rotation info not implemented.
You can identify the file format by the file extension: .tiff, .jpeg, .pdf,
Rotation info is in the http header and in json:
HTTP/1.1 200 OK
Date: Sun, 06 Nov 1994 08:49:37 GMT
Content-Type: application/json; charset=utf-8
Access-Control-Expose-Headers: X-Rotate
X-Rotate: 90
{
"filePath": "ricoh_hdd/scanner/file/0001.jpeg",
"rotate": 90
}
Refer to the WebAPI spec doc for /rws/service/scanner/jobs/{jobID}/file
- File name operation is not nice.
Idealy, you should have a full json handling to get the file path.
Example: String sub1 = body.substring(14); // Quick text cut for test. Should use better algorithm