Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunked file uploading: CIDs are always same as PHP_INT_MAX #1391

Closed
Seungcheol-Lee opened this issue May 14, 2016 · 1 comment
Closed

Chunked file uploading: CIDs are always same as PHP_INT_MAX #1391

Seungcheol-Lee opened this issue May 14, 2016 · 1 comment

Comments

@Seungcheol-Lee
Copy link

Hi, I am working on finding out how to implement 'Continue uploading when an uploaded file which is larger than 1G has been stopped being uploading intentionally or not, even when web browser was closed for 6 hours or so' kind of thing.

And I found a line of code at
php/elFinder.class.php :: Line# 1974

$cid    = $args['cid']? (int)$args['cid'] : '';

which it always cast cid into integer, however this cid seams to be generated on client side by
js/elFinder.js :: Line# 3510

chunkID = new Date().getTime(),

So I think the cid on the back end is always same as PHP_INT_MAX, because obviously javascript date.getTime() always return a number larger than that.
And also I don't think this implementation was intentional.

But this unchanging cid is kinda helping me to get to my goal easily.

p.s I am new to GitHub and this is my first article on GitHub. AND my English skill is kinda crappy. So please let me know if I've done something wrong. Regards.

@nao-pon
Copy link
Member

nao-pon commented May 15, 2016

@Seungcheol-Lee I did not think about the integer maximum value of 32-bit systems. I will fix this. Thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants