OSC / cloudcmd

Cloud Commander orthodox web file manager with console and editor.
cloudcmd.io
0 stars 0 forks source link

add a warning if user attempts to upload a file larger than 2GB #38

Closed brianmcmichael closed 7 years ago

brianmcmichael commented 7 years ago

Adds a confirmation box warning users when file is large and suggest they use SFTP instead, but does not block them from attempting to upload.

largefile

nickjer commented 7 years ago

I'd block them completely from uploading it. Just say we don't support uploads > 2GB and recommend SFTP as well as the link https://www.osc.edu/supercomputing/getting-started/getting-connected

brianmcmichael commented 7 years ago

Larger files still work though, there's just a higher likelihood they'll experience an error. I wasn't sure if we want to actively prohibit it, I erred towards informed consent.

nickjer commented 7 years ago

Any file larger than 10 GB will fail, so we definitely should not be letting them try. Also the probability of failure goes up as their file size approaches 10 GB. So I feel that we should decide on some limit and enforce that the user doesn't upload any files larger than this limit.

brianmcmichael commented 7 years ago

I still don't feel comfortable completely blocking at 10GB because this is an OOD app and that's an OSC-specific limitation.

If another site has a /tmp space larger than 10GB it's not going to be a hard limit.

ericfranz commented 7 years ago

If another site has a /tmp space larger than 10GB it's not going to be a hard limit.

We can make it a configuration option for the app in that case.

brianmcmichael commented 7 years ago

We can make it a configuration option for the app in that case.

I can do this. What do you think we should set the max cutoff at?

And should we keep the warning for files lower than that, but higher than a certain threshold?

I'd recommend 2gb warn, 5gb cutoff. Although that could be problematic if multiple users are uploading large files at once, or if someone gets funny and tries to upload large files concurrently.

Maybe 2gb is best for maintaining system performance... I just don't like it because we can go higher than that.

brianmcmichael commented 7 years ago

Alternatively, or maybe in conjunction with this, we can also get /tmp space increased like we did with /var/tmp for downloads.

nickjer commented 7 years ago

Uploads are affected by /var/tmp, so what is the current size of that in production?

brianmcmichael commented 7 years ago

Updated to block files over a max size. Requires https://github.com/OSC/ood-fileexplorer/pull/139

Per offline discussion, current max is 10GB.

largefile2

nickjer commented 7 years ago

Should the warning be in units of MB? Or would units of GB be better?

brianmcmichael commented 7 years ago

If a user tries to upload a 10002 MB file and we're displaying it in GB, it's going to say that the limit is 10GB and they are trying to upload a 10GB file. I used MB to avoid confusion.

nickjer commented 7 years ago

Then you would need to display down to the byte.

brianmcmichael commented 7 years ago

This is a nice compromise, I think.

nickjer commented 7 years ago

How about...

The file you're uploading is bigger than the server allows (>10 GB). Try uploading the file through a native SFTP client.