From 865f720c0e440f122305f31f20bab0d6ab0f3592 Mon Sep 17 00:00:00 2001 From: Johan Brichau Date: Fri, 29 Mar 2024 13:41:24 +0100 Subject: [PATCH] Remove Seaside-ExternalFileUpload package to load from tonel sources... (not used anymore anyway) --- .../WABasicFormTag.extension.st | 6 -- .../WAExternalFile.class.st | 47 -------------- .../WAExternalFileUploadTag.class.st | 12 ---- .../WAFileUploadExample.class.st | 63 ------------------- .../WAHtmlCanvas.extension.st | 6 -- .../WAUploadExternalFileCallback.class.st | 20 ------ .../package.st | 1 - 7 files changed, 155 deletions(-) delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WABasicFormTag.extension.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WAExternalFile.class.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WAExternalFileUploadTag.class.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WAFileUploadExample.class.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WAHtmlCanvas.extension.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/WAUploadExternalFileCallback.class.st delete mode 100644 repository/Seaside-ExternalFileUpload-Examples/package.st diff --git a/repository/Seaside-ExternalFileUpload-Examples/WABasicFormTag.extension.st b/repository/Seaside-ExternalFileUpload-Examples/WABasicFormTag.extension.st deleted file mode 100644 index 1c8666c56..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WABasicFormTag.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'WABasicFormTag' } - -{ #category : '*seaside-externalfileupload' } -WABasicFormTag >> fileUploadLocation: aLocationString [ - self action: (canvas actionUrl copy addToPath: aLocationString) -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/WAExternalFile.class.st b/repository/Seaside-ExternalFileUpload-Examples/WAExternalFile.class.st deleted file mode 100644 index 70a501ea7..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WAExternalFile.class.st +++ /dev/null @@ -1,47 +0,0 @@ -Class { - #name : 'WAExternalFile', - #superclass : 'WAObject', - #instVars : [ - 'contentType', - 'fileName', - 'filePath' - ], - #category : 'Seaside-ExternalFileUpload', - #package : 'Seaside-ExternalFileUpload' -} - -{ #category : 'accessing' } -WAExternalFile >> contentType [ - ^ contentType -] - -{ #category : 'accessing' } -WAExternalFile >> contentType: aMimeTypeOrString [ - contentType := aMimeTypeOrString isNil - ifFalse: [ aMimeTypeOrString seasideMimeType ] -] - -{ #category : 'accessing' } -WAExternalFile >> fileName [ - ^ fileName -] - -{ #category : 'accessing' } -WAExternalFile >> fileName: aString [ - fileName := aString -] - -{ #category : 'accessing' } -WAExternalFile >> filePath: aString [ - filePath := aString -] - -{ #category : 'accessing' } -WAExternalFile >> fullyQualifiedFilePath [ - ^ filePath -] - -{ #category : 'accessing' } -WAExternalFile >> rawContents [ - ^ GRPlatform current contentsOfFile: filePath binary: true -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/WAExternalFileUploadTag.class.st b/repository/Seaside-ExternalFileUpload-Examples/WAExternalFileUploadTag.class.st deleted file mode 100644 index 137ba3a27..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WAExternalFileUploadTag.class.st +++ /dev/null @@ -1,12 +0,0 @@ -Class { - #name : 'WAExternalFileUploadTag', - #superclass : 'WAFileUploadTag', - #category : 'Seaside-ExternalFileUpload', - #package : 'Seaside-ExternalFileUpload' -} - -{ #category : 'callbacks' } -WAExternalFileUploadTag >> callback: aBlock [ - "Only called if a file was selected." - self name: (self storeCallback: (WAUploadExternalFileCallback on: aBlock)) -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/WAFileUploadExample.class.st b/repository/Seaside-ExternalFileUpload-Examples/WAFileUploadExample.class.st deleted file mode 100644 index 7a54ea225..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WAFileUploadExample.class.st +++ /dev/null @@ -1,63 +0,0 @@ -Class { - #name : 'WAFileUploadExample', - #superclass : 'WAExampleComponent', - #instVars : [ - 'file' - ], - #category : 'Seaside-ExternalFileUpload-Examples', - #package : 'Seaside-ExternalFileUpload', - #tag : 'Examples' -} - -{ #category : 'as yet unclassified' } -WAFileUploadExample class >> description [ - ^ 'A very simple Seaside application' -] - -{ #category : 'as yet unclassified' } -WAFileUploadExample class >> handlerName [ - ^ 'examples/testupload' -] - -{ #category : 'as yet unclassified' } -WAFileUploadExample class >> initialize [ - WAAdmin register: self asApplicationAt: self handlerName -] - -{ #category : 'rendering' } -WAFileUploadExample >> renderContentOn: html [ - html form - multipart; - with: [ - html fileUpload - callback: [ :f | file := f ]. - html submitButton - text: 'Upload file directly' ]. - - html form - multipart; - fileUploadLocation: 'fileupload'; - with: [ - html externalFileUpload - callback: [ :ef | file := ef ]. - html submitButton - text: 'Upload file via front-end' ]. - - file - ifNotNil: [ - html anchor - target: '_blank'; - callback: [ - self requestContext - respond: [ :response | - response - contentType: file contentType; - document: file rawContents asString; - attachmentWithFileName: file fileName ] ]; - with: 'Download ' , file fileName ] -] - -{ #category : 'hooks' } -WAFileUploadExample >> states [ - ^ Array with: self -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/WAHtmlCanvas.extension.st b/repository/Seaside-ExternalFileUpload-Examples/WAHtmlCanvas.extension.st deleted file mode 100644 index e141a49e2..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WAHtmlCanvas.extension.st +++ /dev/null @@ -1,6 +0,0 @@ -Extension { #name : 'WAHtmlCanvas' } - -{ #category : '*seaside-externalfileupload' } -WAHtmlCanvas >> externalFileUpload [ - ^ self brush: WAExternalFileUploadTag new -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/WAUploadExternalFileCallback.class.st b/repository/Seaside-ExternalFileUpload-Examples/WAUploadExternalFileCallback.class.st deleted file mode 100644 index 3941aacc8..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/WAUploadExternalFileCallback.class.st +++ /dev/null @@ -1,20 +0,0 @@ -Class { - #name : 'WAUploadExternalFileCallback', - #superclass : 'WAUploadCallback', - #category : 'Seaside-ExternalFileUpload', - #package : 'Seaside-ExternalFileUpload' -} - -{ #category : 'converting' } -WAUploadExternalFileCallback >> valueForField: anObject [ - | postFields filename filetype location | - postFields := self requestContext request postFields. - filename := postFields at: key , '.name' ifAbsent: [ nil ]. - filetype := WAMimeType fromString: (postFields at: key , '.content_type' ifAbsent: [ '' ]). - location := postFields at: key , '.path' ifAbsent: [ nil ]. - ^ filename - ifNotNil: [ WAExternalFile new - fileName: filename; - contentType: filetype; - filePath: location ] -] diff --git a/repository/Seaside-ExternalFileUpload-Examples/package.st b/repository/Seaside-ExternalFileUpload-Examples/package.st deleted file mode 100644 index 6072492fd..000000000 --- a/repository/Seaside-ExternalFileUpload-Examples/package.st +++ /dev/null @@ -1 +0,0 @@ -Package { #name : 'Seaside-ExternalFileUpload-Examples' }