Closed felix2056 closed 5 years ago
Hello,
You should be able to upload directly to your google
disk:
https://laravel.com/docs/5.8/requests#storing-uploaded-files
Ok that worked for me thanks for your help
np, glad it helped :)
hi @ivanvermeyen, the solution u give above works correctly on native HTML forms. but file upload progress using javascript ajax, XHR not giving progress as the file uploaded. instead, xhr gives 100% in one time but the file is being uploaded. actually my problem is to upload the file on google drive and track the progress of the upload. and my server didn't have much RAM/execution-time/storage access. so please suggest me some good idea to achieve my goal.
@ProgrammingPlanet I'm not an expert on this, but perhaps this can be of use to you? https://www.sitepoint.com/tracking-upload-progress-with-php-and-javascript/
Also, an example to put and get files using streams was added earlier: see this commit. This is also useful to minimize the server memory needed.
Does the file I want to upload necessarily have to be in my storage path? Can't I upload directly from a form to google drive? I just started using Laravel last week so am new to it's file uploading methods and all. The put route example you have on your route file creates a txt file and uploads. And the put-existing tries to locate the file in my public path then uploads to drive. But can I have something that just uploads directly to drive? sorry if this is a rookie question coming from an inexperienced guy.