Comments (10)
@djoos As it seems you managed to make it work in your "extension" https://github.com/escapestudios/EscapeGaufretteExtension, is it possible for you to make a PR based on this?
from gaufrette.
I've taken the liberty to integrate the temp file buffer functionality from EscapeGaufretteExtension into my own fork (but don't use this - see next comment): https://github.com/Uplink03/Gaufrette/tree/enhance/escape-gaufrette
I didn't take the OpenCloud changes.
I didn't put too much thought into it, so now the InMemoryBuffer isn't used and there's no option to select it. But maybe it helps somebody. If you review the changes and find them good for a PR, I'll make a PR.
from gaufrette.
Top tip when dealing with large file uploads to OpenCloud: make sure to define RAXSDK_TIMEOUT with a higher-than-default (default = 30) value.
eg.
define('RAXSDK_TIMEOUT', 1800);
Hope this helps!
Kind regards,
David
from gaufrette.
I am having the same issue with handling large file uploads. All adapters that do support resource write() call Util/Size which uses mb_strlen to determine content size. This should be avoided.
from gaufrette.
@djoos Is this still relevant?
from gaufrette.
Hi @wysow,
yes, the issue is still relevant: AFAIK the file content is still kept in memory in the bundle when not using our tempfile workaround (see above)...
This is an issue when handling (very) large file uploads...
Hope this helps!
Kind regards,
David
from gaufrette.
Definitely, I'll keep you updated!
from gaufrette.
Is there working build available now?
from gaufrette.
Hi @SrgSteak,
I haven't got round to starting the work of getting our "extension" into Gaufrette...
However, I haven't forgotten this thread!
Kind regards,
David
from gaufrette.
UPDATE: DON'T USE THIS CODE. It's introduces an incompatible API change. Just check out what happens in TempFileBuffer's flush
method: the content is the temp file's filename. Without reviewing the OpenCloud changes, I'm gonna say that they address this behaviour, but if you go and use, say, S3, you get the temp file's filename instead of the content.
While researching this I noticed that I can pass fopen
handles to filesystem->write
, so I can replace all file_get_contents with fopen and get rid of the memory issues. Both AwsS3 and Local adapters accept this usage, and I would suggest it gets documented and expected across the board from all other adapters.
This also means I don't need to use streams at all.
A few days ago I said:
I've taken the liberty to integrate the temp file buffer functionality from EscapeGaufretteExtension into my own fork: https://github.com/Uplink03/Gaufrette/tree/enhance/escape-gaufrette
I didn't take the OpenCloud changes.
I didn't put too much thought into it, so now the InMemoryBuffer isn't used and there's no option to select it. But maybe it helps somebody. If you review the changes and find them good for a PR, I'll make a PR.
from gaufrette.
Related Issues (20)
- [1.0] Deprecate removed methods
- class CreateContainerOptions HOT 1
- How to update metadata of file in GridFS HOT 1
- [suggestion] Make service property available from AwsS3 adapter HOT 1
- StreamWrapper, write called twice
- AWS SDK about deprecated dependency warning HOT 1
- Support MimeTypeProvider in AzureBlobStorage.
- Big file issue
- [1.0] Openstack error File not found when `setMetadata` and call `resetMetadata` HOT 4
- Add Flysystem Adapter isDirectory support
- Support for AsyncAws
- Deprecated adapters removed in incorrect version HOT 3
- Local issue Operation not permitted
- Add a .gitattributes file HOT 2
- $file->getContent() return a StreamInterface instead of a String with GoogleCloudStorage adapter HOT 3
- Doctrine DBAL adapter does not work with doctrine/dbal:^3.0
- pulse & plans for the 1.x branch HOT 5
- :wrench: Cleaning build stuff HOT 3
- Wrong creation year of file HOT 4
- on php8.2 $context on StreamWrapper is missing HOT 4
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 gaufrette.