8000 Add attachment with url by LaurentMarquet · Pull Request #11965 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Add attachment with url #11965

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

Merged
merged 1 commit into from
Jul 16, 2019
Merged

Add attachment with url #11965

merged 1 commit into from
Jul 16, 2019

Conversation

LaurentMarquet
Copy link
Contributor

Without this we may think (as I did until I tested) that it can only work with a file path and not with url

Without this we may think (as I did until I tested) that it can only work with a file path and not with url
@javiereguiluz
Copy link
Member

Nice addition Laurent! I didn't know this, so thanks for contributing it and thanks for teaching me about this!

@javiereguiluz javiereguiluz merged commit 165e128 into symfony:4.3 Jul 16, 2019
javiereguiluz added a commit that referenced this pull request Jul 16, 2019
This PR was merged into the 4.3 branch.

Discussion
----------

Add attachment with url

Without this we may think (as I did until I tested) that it can only work with a file path and not with url

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

165e128 Add attachment with url
@xabbuh
Copy link
Member
xabbuh commented Jul 19, 2019

I am not sure that we should really document this behaviour. That relies on how PHP is configured to work with URLs when fopen() is used and potentially may break in the future if the code is switched to use another mechanism.

@OskarStark
Copy link
Contributor

I think it’s nice to know but a warning or a comment about xabbuh‘s comment would be useful

@javiereguiluz
Copy link
Member

Yes, I''m going to add a brief comment about this ... meanwhile, I created the #11995 issue to not forget about this.

@LaurentMarquet
Copy link
Contributor Author

I don't know if we can implement it to work without having to rely on php settings, but I think it's needed, because sometimes we don't know where the file is physically stored on the server, especially if we use a Route, as in the case I've tested it.
Using a Route allows to have dynamically created files, i.e. pdf generated using KnpSnappy.

@xabbuh
Copy link
Member
xabbuh commented Sep 3, 2020

FYI: symfony/symfony#38047

@fabpot
Copy link
Member
fabpot commented Sep 7, 2020

This should be reverted as it was never meant to be supported.

@LaurentMarquet
Copy link
Contributor Author

As you wish, but as explained above I think it's needed, especially when using Routes

@xabbuh
Copy link
Member
xabbuh commented Sep 7, 2020

reverted in #14186

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

Successfully merging this pull request may close these issues.

6 participants
0