sizechk.js 291 B

1234567891011121314
  1. /*
  2. Check the download size of the current file
  3. Require paramter
  4. filepath (full path of downloading file)
  5. */
  6. requirelib("filelib");
  7. if (!filelib.fileExists(filepath)){
  8. sendJSONResp(-1);
  9. }else{
  10. var filesize = filelib.filesize(filepath);
  11. sendJSONResp(filesize);
  12. }