Skip to content
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

feat: add private download feature #359

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

JulianMar
Copy link

@JulianMar JulianMar commented Feb 15, 2024

closes #358

Copy link
Collaborator

@Rezrazi Rezrazi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add some tests? Thank you

And thanks for the PR!

Comment on lines +131 to +132
:download="`/nova-vendor/nova-file-manager/files/download?path=${file?.path}`"
:href="`/nova-vendor/nova-file-manager/files/download?path=${file?.path}`"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move these to an attribute, e.g file.downloadUrl
should allow for a better centralization of data and easier refactoring/customization

* @param \Oneduo\NovaFileManager\Http\Requests\DownloadFileRequest $request
* @return \Illuminate\Http\JsonResponse
*/
public function download(DownloadFileRequest $request)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a type hit for the return of this function

Comment on lines -163 to +171
$this->authorizationAttribute() => __('nova-file-manager::errors.authorization.unauthorized',
['action' => $this->authorizationActionAttribute()]),
$this->authorizationAttribute() => __(
'nova-file-manager::errors.authorization.unauthorized',
['action' => $this->authorizationActionAttribute()]
),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary code style change, please keep PR feature-only

@JulianMar
Copy link
Author

Thanks for the review! I will fix it later this week :)

@DCdeBrabander
Copy link

DCdeBrabander commented May 23, 2024

Bump!

I'd like this feature. I needed to use a different file-manager package since previous one didn't support Nova 4...
But my project needs to support 'private' files and downloads.

Do you need help @JulianMar ?

Download works only if I move these files into ./storage/app/public (which is symlinked from ./public_html/storage)

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

Successfully merging this pull request may close these issues.

Download private Files
3 participants