filestack / filestack-angular Goto Github PK
View Code? Open in Web Editor NEWAn official angular component library for the Filestack
License: MIT License
An official angular component library for the Filestack
License: MIT License
While trying to upload .mzXML files, the filestack API returns error "content not allowed"
with status code 403, alternatively using the respective react
flavoured package it works normally.
Steps to reproduce:
clone then run ng build filestack-angular. Then got the following errors. I also cut and paste code into a blank project and most example didn't work. I did get one example working with ng-picker-overlay but was not able to set options from FilestackModule.forRoot({ apikey: 'APIkey' }, options) as documented. Is this the only Angular example code? Is there anything that is more up to date and working with current versions?
Compiling TypeScript sources through ngc
ERROR: projects/filestack-angular/src/lib/picker/pickerBase.component.ts:14:23 - error NG2007: Class is using Angular features but is not decorated. Please add an explicit Angular decorator.
14 export abstract class PickerBaseComponent implements OnInit, OnDestroy {
~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerOverlay.component.ts:18:14 - error NG2006: The component PickerOverlayComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerOverlayComponent.
18 export class PickerOverlayComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerInline.component.ts:13:14 - error NG2006: The component PickerInlineComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerInlineComponent.
13 export class PickerInlineComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerDropPane.component.ts:10:14 - error NG2006: The component PickerDropPaneComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerDropPaneComponent.
10 export class PickerDropPaneComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~~~
An unhandled exception occurred: projects/filestack-angular/src/lib/picker/pickerBase.component.ts:14:23 - error NG2007: Class is using Angular features but is not decorated. Please add an explicit Angular decorator.
14 export abstract class PickerBaseComponent implements OnInit, OnDestroy {
~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerOverlay.component.ts:18:14 - error NG2006: The component PickerOverlayComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerOverlayComponent.
18 export class PickerOverlayComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerInline.component.ts:13:14 - error NG2006: The component PickerInlineComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerInlineComponent.
13 export class PickerInlineComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~
projects/filestack-angular/src/lib/picker/pickerDropPane.component.ts:10:14 - error NG2006: The component PickerDropPaneComponent inherits its constructor from PickerBaseComponent, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of PickerBaseComponent's constructor. Either add a @directive decorator to PickerBaseComponent, or add an explicit constructor to PickerDropPaneComponent.
10 export class PickerDropPaneComponent extends PickerBaseComponent implements AfterContentInit {
~~~~~~~~~~~~~~~~~~~~~~~
See "C:\Users\james\AppData\Local\Temp\ng-BNPSC9\angular-errors.log" for further details.
Any plans to update for angular 12?
yarn
ng serve filestack-angular-example
➜ filestack-angular git:(master) ✗ ng serve filestack-angular-example
To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Project 'filestack-angular-example' does not support the 'serve' target.
Error: Project 'filestack-angular-example' does not support the 'serve' target.
at ServeCommand.initialize (/Volumes/PITBULL/Vault/filestack-angular/node_modules/@angular/cli/models/architect-command.js:58:19)
at process._tickCallback (internal/process/next_tick.js:68:7)
at Function.Module.runMain (internal/modules/cjs/loader.js:832:11)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Better to add Multipart upload too.. it will help us a lot.
I've been attempting to upgrade an Angular application from 12 to 14 and have been having issues getting filestack to be recognized. Here are a few examples of the errors that I'm receiving:
Error: node_modules/@filestack/angular/projects/filestack-angular/src/lib/filestack-transform.pipe.ts:14:51 - error TS2345: Argument of type 'TransformOptions | undefined' is not assignable to parameter of type 'TransformOptions'.
Type 'undefined' is not assignable to type 'TransformOptions'.
14 return this.filestackService.transform(value, transformOptions);
~~~~~~~~~~~~~~~~
Error: node_modules/@filestack/angular/projects/filestack-angular/src/lib/filestack.service.ts:25:11 - error TS2564: Property 'clientInstance' has no initializer and is not definitely assigned in the constructor.
25 private clientInstance: Client;
~~~~~~~~~~~~~~
Error: node_modules/@filestack/angular/projects/filestack-angular/src/lib/filestack.service.ts:27:11 - error TS2564: Property 'clientOptions' has no initializer and is not definitely assigned in the constructor.
27 private clientOptions: ClientOptions;
~~~~~~~~~~~~~
Error: node_modules/@filestack/angular/projects/filestack-angular/src/lib/filestack.service.ts:29:11 - error TS2564: Property 'apikey' has no initializer and is not definitely assigned in the constructor.
29 private apikey: string;
According to the docs, I need to import filestack like so:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { FilestackModule } from '@filestack/angular';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FilestackModule.forRoot({ apikey: YOUR_APIKEY, options: ClientConfig })
],
bootstrap: [AppComponent]
})
export class AppModule {}
However I can't even get it to be recognized when I try importing it like that. The only way I've been able to get it to be recognized is by changing the import statement to:
import { FilestackModule } from '@filestack/angular/projects/filestack-angular/src/lib/filestack.module';
I'm trying to provide a file as input into ng-picker-overlay
like this:
<ng-picker-overlay
[apikey]="apiKey"
[clientOptions]="clientOptions"
[file]="inputFile"
(uploadSuccess)="onUploadSuccess($event)"
(uploadError)="onUploadError($event)"
>
and i expecting that filestack modal will open with provided file selected.
but in fact, it opens empty.
can you please provide some example of this file input usage, or maybe you can suggest a way to provide file into picker to upload?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.