spyre icon indicating copy to clipboard operation
spyre copied to clipboard

Multi app file uploading bug

Open DamianSkrzypczak opened this issue 7 years ago • 1 comments

I have multiap with "Home" site on route "/" and also "UploadFile" site on route "/uploadFile", after uploading via button on site with route other than "/" there is no trigger on storeUpload this is caused because in view.html file in line 498 there is hardcoded ajax attribute url: '/upload', when i change this into url: '/uploadFile/upload', I'm having trigger working fine.

please implement some functionality for replacing this url attribute with proper route

Also tested in scenario when I made in "Home" def storeUpload(self, file): UploadFile.upload_file = file UploadFile.upload_data = file.read() in UploadFile I moved parameters upload_file and upload_data as class attributes. but this is pure hacking...

DamianSkrzypczak avatar Oct 25 '17 21:10 DamianSkrzypczak

I solved problem by changing line 498 from file view.html url: '/upload' into url: '{{prefix}}/upload', and changing class attribute prefix now I have full control (for "/" no change ) but this requires prefix attribute to start with "/" for example prefix="/uploadFile"

DamianSkrzypczak avatar Oct 25 '17 21:10 DamianSkrzypczak