Comments (13)
is there any particular error message you can provide for us to debug?
from resumable.php.
Hm, actually, the issue seems straight forward... file_exists
> then mkdir
? Should be is_dir
in my opinion ;-).
from resumable.php.
@adadgio
Hmmm, I think file_exists does check directory.
file_exists — Checks whether a file or directory exists
Refer to http://php.net/manual/en/function.file-exists.php
from resumable.php.
My bad, you are absolutely right @dilab !
Other suggestion which happened to me quite a few times... the function would return false when the file permissions are wrong (or if the server does not have them).
See also the warning
section of http://php.net/manual/en/function.file-exists.php
I think this is it. Try to fix your permissions.
from resumable.php.
I think it makes sense.
We could throw an exception if file_exists
return FALSE.
from resumable.php.
Yup. Right thing to do i guess.
from resumable.php.
this seemed to appear randomly it doesnt appear now however after deploying my code to a virtual machine i seem to get an error all of dillab backend methods dont work including Call to undefined method Dilab\Resumable::getExtension()
however it works very wel on my local development environment
please assist
this is my code
$request = new SimpleRequest();
$response = new SimpleResponse();
$resumable = new Resumable($request, $response);
$ext = $resumable->getExtension();
from resumable.php.
@wyklif is the server working for your other PHP codes? What is the server and PHP specs?
from resumable.php.
Yes the server is working before i first begin uploading i use intervention to get an uploaded image resize and save it that part is working fine so i am sure that composer autoload is working fine.. then the progress bar loads to the end then it fails with the above error. i am on ubuntu 14.04 on a lamp stack i ahve set upload file size to 5G post size to 5G maximum execution time to 3600 i am on php 5.6 im using laravel 5.3
from resumable.php.
Why are you calling $ext = $resumable->getExtension();
directly?
from resumable.php.
because i am generating a random name for an uploaded file then appending its extension so that the file is served correctly
from resumable.php.
you should update tmpChunkDir to work with windows filesystem too (if dev pc has windows):
instead of
mkdir($tmpChunkDir);
do
mkdir($tmpChunkDir, 0777, true);
Otherwise mkdir will throw errors about file missing, etc.
from resumable.php.
a PR is welcome.
from resumable.php.
Related Issues (20)
- CakePHP Folder.php class issue. HOT 1
- Cannot make it work, error in script HOT 2
- This doesn't work in the latest version ? HOT 3
- Request type detection HOT 1
- SimpleRequest is empty HOT 1
- frontend HOT 7
- Update composer package HOT 1
- Server returns 200 when file paths are wrong HOT 1
- Code is not working out of the box HOT 4
- BUG: File large than chunksize, possible corrupt after merging.
- headers and HTTP 1.1 HOT 2
- Resumable is not defined HOT 6
- Monolog HOT 1
- Broke framework compatibility HOT 1
- if the last chunk reach at last it will fail HOT 1
- Composer Install Error HOT 2
- how to override new FileName if FileExist and return Filename as response??? HOT 1
- Security vulnerability - arbitrary file upload anywhere in the file system HOT 7
- Make Contribution HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resumable.php.