MSMK Posted August 17, 2018 Share Posted August 17, 2018 столкнулся с проблемой, не отрабатывает метод сессии SendFile. Сделал все как в примерах. Ничего не происходит при вызове метода UniSession.SendFile(FileName) Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 17, 2018 Author Share Posted August 17, 2018 вызов происходит в модальном окне Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 20, 2018 Author Share Posted August 20, 2018 использую лицензионную версию uniGUI Complete - Professional Edition. есть подписка Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 20, 2018 Share Posted August 20, 2018 Добрый день, использую лицензионную версию uniGUI Complete - Professional Edition. есть подписка Спасибо, и в первую очередь пожалуйста, настройте Ваш email: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ 1 Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 22, 2018 Author Share Posted August 22, 2018 Добрый день, Спасибо, и в первую очередь пожалуйста, настройте Ваш email: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/ сделали Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2018 Share Posted August 23, 2018 сделали Простите, но я не вижу изменений... Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 23, 2018 Author Share Posted August 23, 2018 Простите, но я не вижу изменений... подписка закреплена на email mikhaylenko@toowto.kz, дополнительно указал почту ForumEmail: asanov@toowto.kz. 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 23, 2018 Share Posted August 23, 2018 столкнулся с проблемой, не отрабатывает метод сессии SendFile. Сделал все как в примерах. Ничего не происходит при вызове метода UniSession.SendFile(FileName) Какой формат файла ? Возможно, Вам поможет "этот код": http://forums.unigui.com/index.php?/topic/9870-unisessionsendstream/&do=findComment&comment=57183 Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 24, 2018 Author Share Posted August 24, 2018 Какой формат файла ? Возможно, Вам поможет "этот код": http://forums.unigui.com/index.php?/topic/9870-unisessionsendstream/&do=findComment&comment=57183 файл .rtf Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 24, 2018 Author Share Posted August 24, 2018 Какой формат файла ? Возможно, Вам поможет "этот код": http://forums.unigui.com/index.php?/topic/9870-unisessionsendstream/&do=findComment&comment=57183 procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('rtf', 'application/rtf'); ... Помогло решить проблему. Большое спасибо! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 24, 2018 Share Posted August 24, 2018 файл .rtf UniServerModule, procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('rtf', 'application/rtf'); end; Quote Link to comment Share on other sites More sharing options...
Kast2k Posted September 17, 2020 Share Posted September 17, 2020 Добрый день! Подниму старую тему. Версия 1.90.0.1528 В ServerModule добавлено: MimeTable.AddMimeType('msg', 'application/msg'); Для отправки файлов используется UniSession.SendFile() Проблема: Файл лежит в расшаренной папке на сервере где работает HyperService, путь s:='\\10.190.62.53\GlobalDesk\Systems\CHG\27012020135848Документ Перенос Проводок Международный Модуль Объекта Выполнить Перенос.msg' При выполнении UniSession.SendFile(s, 'test.msg') не отправляется ничего. На иных файлах проблема наблюдается при наличии русских символов в имени или большого количества пробелов. Грешил на кодировку, но UniSession.Log пишет имена как читаемого, так и отправляемого корректно. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 17, 2020 Share Posted September 17, 2020 Используете ли Вы hyperserver? Quote Link to comment Share on other sites More sharing options...
Kast2k Posted September 17, 2020 Share Posted September 17, 2020 Да, используется для этого проекта. Также добавлю, что если просто запустить с сервера\ПК сам экзешник (Standalone), то всё работает нормально. А при использовании HyperServer - нет. В консоли на данный тип файла выдаётся ошибка 401. Все файлы на видео лежат в одной папке bandicam 2020-09-17 17-11-17-775.mp4 Quote Link to comment Share on other sites More sharing options...
stas Posted September 17, 2020 Share Posted September 17, 2020 Гиперсервер запускается в режиме сервиса? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 17, 2020 Share Posted September 17, 2020 2 hours ago, Kast2k said: Также добавлю, что если просто запустить с сервера\ПК сам экзешник (Standalone), то всё работает нормально. А при использовании HyperServer - нет. Вы должны настроить конфиг файл гиперсервера, т.е., добавить мим тайп. Пожалуйста посмотрите документацию. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 17, 2020 Share Posted September 17, 2020 http://unigui.com/doc/online_help/installing-and-configuring-hyp.htm [custom_mimes] mime_0_ext= mime_0_type= mime_1_ext= mime_1_type= mime_2_ext= mime_2_type= mime_3_ext= mime_3_type= mime_4_ext= mime_4_type= Custom mimes allows to add custom file types to HyperServer scope. Under normal conditions for security reason only safe file types are allowed to be transferred from the server. You can define as much as mimes needed here. New mimes can be simply added by adding a entry to CFG file. Consider you want to enable access to files with extension of "7z". You need to add below entry: mime_0_ext=7z mime_0_type=application/x-7z-compressed 1 Quote Link to comment Share on other sites More sharing options...
stas Posted September 17, 2020 Share Posted September 17, 2020 Шерзод, не факт, меня смутил сетевой диск, вопрос про сервис не праздный Quote Link to comment Share on other sites More sharing options...
Kast2k Posted September 17, 2020 Share Posted September 17, 2020 3 hours ago, Sherzod said: Вы должны настроить конфиг файл гиперсервера, т.е., добавить мим тайп. Спасибо. заработало как добавление в hyperserver.cfg файл application/vnd.ms-outlook Поясните, пожалуйста, почему в таком случае часть файлов начинает открываться при добавлении в ServerModule MimeTable.AddMimeType, а некоторые типы как msg - нет? Для эксперимента изменил hyperserver.cfg и оно заработало. Далее, откатил обратно cfg файл и добавил строку MimeTable.AddMimeType('msg', 'application/vnd.ms-outlook'); , но эффекта не наступило. Баг? Quote Link to comment Share on other sites More sharing options...
stas Posted September 18, 2020 Share Posted September 18, 2020 Нет, часть типов уже зарегистрирована в hyperserver Quote Link to comment Share on other sites More sharing options...
Kast2k Posted September 18, 2020 Share Posted September 18, 2020 Спасибо, разобрался Quote Link to comment Share on other sites More sharing options...
Ki Sung Kim Posted January 25, 2023 Share Posted January 25, 2023 Open the hyper_server.cfg file. It was resolved by adding [custom_mimes]. Thank you so much. Happy New Year!. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.