Can you save an image in angular without the backend?

I want to save an image in angular's Assert folder or in a folder created by me. I occupy the input file and a button, nothing more when I save the selected image, I want it to be uploaded or copied to said folders or folder. Can this be done without the backend?

I have been looking for information and watching videos but most of them either use firebase or some other service, I just want it locally. Please, your help would help me a lot.

Upvotes: 1

Views: 976

Answers (1)

GreyBeardedGeek
GreyBeardedGeek

Reputation: 30088

If I understand your question correctly, you are asking if, at runtime, you can create a file in your Angular applications' 'assets' folder.

This is not possible, because the 'assets' folder is a compile-time artifact. It only exists in your source code tree. In the compiled application, the assets folder does not exist.

Furthermore, when the folder exists, it only does so on the computer on which you wrote the application. The user is running it in their web browser, which is generally running on their computer, not yours.

Now, if you are just asking if you can save a file on the user's computer, take a look at File Save functionality in Angular

Upvotes: 2

Related Questions