\UploadController

Controller to handle uploads Ability to transform timewise files to partwise files

Summary

Methods
Properties
Constants
postUpload()
getUploadComplete()
No public properties found
No constants found
setupLayout()
No protected properties found
N/A
xslTransform()
_saveFile()
No private properties found
N/A

Methods

postUpload()

postUpload() : \Illuminate\Http\JsonResponse

Function to handle POST request for file upload

Returns

\Illuminate\Http\JsonResponse —

The JSON response code

getUploadComplete()

getUploadComplete() : \Illuminate\Http\RedirectResponse

Function to trigger that the upload is complete

Returns

\Illuminate\Http\RedirectResponse —

The redirect to trigger search

setupLayout()

setupLayout() : void

Setup the layout used by the controller.

xslTransform()

xslTransform(string  $url) : boolean|string

Function to transform MusicXML files in format "score-timewise" to format "score partwise"

Parameters

string $url

The url of the file to transform

Returns

boolean|string —

False when operation fails, URL as string when operation succeeds

_saveFile()

_saveFile(\User  $user, string  $url) 

Function to save files to database

Parameters

\User $user

The user as Eloquent Model

string $url

The file url