Git Product home page Git Product logo

filestore's Introduction

Agile Toolkit - Web UI Toolkit

Join the chat at https://gitter.im/atk4/atk4

Agile Toolkit is a Web UI framework and collection of usable widgets. It allows you to develop rich web applications by writing only PHP code. Agile Toolkit is inspired by Desktop GUI Toolkits and is a fully-object oriented development environment.

Overview

Agile Toolkit has introduced three new principles in web development:

  • A Complete UI solution for PHP developers
  • Unique integration between jQuery events and chains and PHP
  • Innovative Object Relational Manager with support for joins, sub-selects and expression abstraction.

All the features are delivered in a unique close-coupled environment - Similarly to Cocoa or Qt - all objects of Agile Toolkit are based off one common ancestor and are constructed under the guidance of the top-level Application object.

Installing

To start a new web application in Agile Toolkit, download a bundle from http://agiletoolkit.org/ and follow instructions. Alternatively, if you are a very hardcore developer, add the following code inside your composer.json file:

"require": {
    "atk4/atk4": "4.3.*@dev"
}

Example

To help you understand some key principles of Agile Toolkit, copy the following example into page/index.php and place inside the init() method.

Message to Romans

Source:

$form = $this->add('Form');
$form->addField('line', 'subject')->validateNotNull();
$form->addField('password','password');
$form->addSubmit();

if ($form->isSubmitted()) {
    $this->js()->univ()
        ->dialogOK('Hello World','Subject: '.$form['subject'])
        ->execute();
}

Congratulations. You have now created a fully AJAX / PHP form, fully protected from SQL / HTML / JS injection, based on jQuery UI theme and Bootstrap-compatible 12-column flexible grid system.

License

Agile Toolkit is distributed under MIT License.

Your support will ensure the longevity of Agile Toolkit

filestore's People

Contributors

2kodes avatar abbadon1334 avatar darkside666 avatar mkrecek234 avatar mvorisek avatar romaninsh avatar szepeviktor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filestore's Issues

Composer installing error

using composer require atk4\filestore

error in console:

[InvalidArgumentException]
Could not find a matching version of package atk4filestore. Check the packa
ge spelling, your version constraint and that the package is available in a
stability which matches your minimum-stability (stable).

Missing Fields in friend.sql

Hello,

I tried to run the demo and got the following error:
atk4_filestore

Even though the fields (file and file2 ) are part of the Frend model they are missing from the friend.sql. On adding the columns to the database manually there were no further errors.

atk4/ui 2.1 breaks code

This does not work anymore:
$this->addField('attachment', new \atk4\filestore\Field\File($this->app->filesystem));

Error:
Error: Class 'atk4\filestore\Model\Model' not found

Demo throwing error with latest Atk4/Data

Steps to reproduce:

  • Open demo
  • Error produce since latest Data develop branch:
Critical Error Atk4\Data\Exception: Reference type mismatch
Exception Parameters
--
ourField | Atk4\Data\Field (file)
ourFieldType | 'integer'
theirField | Atk4\Data\Field (token)
theirFieldType | 'string'

in line

$m->refModel($this->shortName)->loadBy('token', $token)->delete();

installing error

running
composer require atk4/filestore

error in the console:

Could not find a version of package atk4/filestore

 [InvalidArgumentException]                                                   
  Could not find a version of package atk4/filestore matching your minimum-st  
  ability (stable). Require it with an explicit version constraint allowing i  
  ts desired stability.                                                        
                          

Implement download file

Are there any activities to implement also the download part?

  • Have a simple object to serve file download stream
  • Offer an option in the existing (upload/delink) field to also re-download the file
  • Offer a view object to just download the file

Subsequently adding new files in separate fields not working

Steps to reproduce in the existing demo:

  1. Upload a File in the "File" field.
  2. Save the form
  3. Then, upload a second file in the "File 2" field.
  4. Save the form.

What happens: it sets the token of the first "File" field to null, and fills the second "File 2" field with the new filename.

Expected behaviour:
It should keep the "File" token, and only add another token to the "File 2" field.

Multiple file upload

Multiple file uploads would be appreciated (with tokens stored in a single comma-separated text file which is shown similar to a multi-select dropdown where individual files can be deleted again, and each file can be downloaded)

Missing Image class

The documentation states "Filestore also implements \atk4\filestore\Field\Image class", however, there is no Image class in the source. Where can we find the Image class?

Thanks

Do not delete if other tokens refer to same location

Situation:

  • Sometimes you want to have one physical file which is referred to by multiple entities, for example you do a mass mailing with an attachment and have many email message entities which share the same attachment
  • You would want them to attach via filestore with individual tokens, but with the same location field, so you do not have to store the attachment file e.g. 1000 times.
  • Issue today: If one of those mass emails is deleted, filestore would delete the physical file location where then all other emails lose their file as well

Proposed solution:

  • filestore will only delete the physical file, if there is no other entity in file model which refers to the same location. Otherwise the file will not be deleted.

Please share your thoughts, I could then submit a PR implementing this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.