Open yokesh22 opened 1 year ago
Hello,
The value of DOC_SERV_SITE_URL should contain the Document Server's (ONLYOFFICE Docs) address, so please double-check if it's available at that address. The value of EXAMPLE_DOMAIN should either be left default (None) or it should be http://192.168.1.119:8000 in your case. If you leave it as None, then you should access the example via its IP address instead of localhost.
When I use the provided Python example, the view page opens correctly, but the edit page fails to display properly as shown in the image below.
Upon checking the logs of the Document Server container, the following error message can be observed.
I have change DOC_SERV_SITE_URL. Config.py
import os
VERSION = '1.6.0'
FILE_SIZE_MAX = 5242880
STORAGE_PATH = 'app_data'
DOC_SERV_FILLFORMS = [".docx", ".oform"]
DOC_SERV_VIEWED = [".djvu", ".oxps", ".pdf", ".xps"] # file extensions that can be viewed
DOC_SERV_EDITED = [ # file extensions that can be edited
".csv", ".docm", ".docx", ".docxf", ".dotm", ".dotx",
".epub", ".fb2", ".html", ".odp", ".ods", ".odt", ".otp",
".ots", ".ott", ".potm", ".potx", ".ppsm", ".ppsx", ".pptm",
".pptx", ".rtf", ".txt", ".xlsm", ".xlsx", ".xltm", ".xltx"
]
DOC_SERV_CONVERT = [ # file extensions that can be converted
".doc", ".dot", ".dps", ".dpt", ".epub", ".et", ".ett", ".fb2",
".fodp", ".fods", ".fodt", ".htm", ".html", ".mht", ".mhtml",
".odp", ".ods", ".odt", ".otp", ".ots", ".ott", ".pot", ".pps",
".ppt", ".rtf", ".stw", ".sxc", ".sxi", ".sxw", ".wps", ".wpt",
".xls", ".xlsb", ".xlt", ".xml"
]
DOC_SERV_TIMEOUT = 120000
DOC_SERV_SITE_URL = 'http://192.168.2.100:6831/'
DOC_SERV_CONVERTER_URL = 'ConvertService.ashx'
DOC_SERV_API_URL = 'web-apps/apps/api/documents/api.js'
DOC_SERV_PRELOADER_URL = 'web-apps/apps/api/documents/cache-scripts.html'
DOC_SERV_COMMAND_URL='coauthoring/CommandService.ashx'
EXAMPLE_DOMAIN = None
DOC_SERV_JWT_SECRET = '' # the secret key for generating token
DOC_SERV_JWT_HEADER = 'Authorization'
DOC_SERV_JWT_USE_FOR_REQUEST = True
DOC_SERV_VERIFY_PEER = False
EXT_SPREADSHEET = [
".xls", ".xlsx", ".xlsm", ".xlsb",
".xlt", ".xltx", ".xltm",
".ods", ".fods", ".ots", ".csv"
]
EXT_PRESENTATION = [
".pps", ".ppsx", ".ppsm",
".ppt", ".pptx", ".pptm",
".pot", ".potx", ".potm",
".odp", ".fodp", ".otp"
]
EXT_DOCUMENT = [
".doc", ".docx", ".docm",
".dot", ".dotx", ".dotm",
".odt", ".fodt", ".ott", ".rtf", ".txt",
".html", ".htm", ".mht", ".xml",
".pdf", ".djvu", ".fb2", ".epub", ".xps", ".oxps", ".oform"
]
LANGUAGES = {
'en': 'English',
'hy': 'Armenian',
'az': 'Azerbaijani',
'eu': 'Basque',
'be': 'Belarusian',
'bg': 'Bulgarian',
'ca': 'Catalan',
'zh': 'Chinese (Simplified)',
'zh-TW': 'Chinese (Traditional)',
'cs': 'Czech',
'da': 'Danish',
'nl': 'Dutch',
'fi': 'Finnish',
'fr': 'French',
'gl': 'Galego',
'de': 'German',
'el': 'Greek',
'hu': 'Hungarian',
'id': 'Indonesian',
'it': 'Italian',
'ja': 'Japanese',
'ko': 'Korean',
'lo': 'Lao',
'lv': 'Latvian',
'ms': 'Malay (Malaysia)',
'no': 'Norwegian',
'pl': 'Polish',
'pt': 'Portuguese (Brazil)',
'pt-PT': 'Portuguese (Portugal)',
'ro': 'Romanian',
'ru': 'Russian',
'si': 'Sinhala (Sri Lanka)',
'sk': 'Slovak',
'sl': 'Slovenian',
'es': 'Spanish',
'sv': 'Swedish',
'tr': 'Turkish',
'uk': 'Ukrainian',
'vi': 'Vietnamese',
'aa-AA': 'Test Language'
}
if os.environ.get("EXAMPLE_DOMAIN"): # generates a link for example domain
EXAMPLE_DOMAIN = os.environ.get("EXAMPLE_DOMAIN")
if os.environ.get("DOC_SERV"): # generates links for document server
DOC_SERV_SITE_URL = os.environ.get("DOC_SERV")
@github-ljx Could you check if the issue persists with the latest versions of the Document Server and the Python example?
I have the same problem with springboot
` server.version=1.9.0
server.address= server.port=4000
filesize-max=5242880 filename-max=50
files.storage=C:\documentosOffice files.storage.folder=
files.docservice.timeout=120000 files.docservice.history.postfix=-hist
files.docservice.url.site=http://localhost:80/ files.docservice.url.converter=ConvertService.ashx files.docservice.url.command=coauthoring/CommandService.ashx files.docservice.url.api=web-apps/apps/api/documents/api.js files.docservice.url.preloader=web-apps/apps/api/documents/cache-scripts.html files.docservice.url.example=
files.docservice.secret=my_jwt_secret files.docservice.header=Authorization files.docservice.token-use-for-request=true
files.docservice.verify-peer-off=true
files.docservice.languages=en:English|ar:Arabic|hy:Armenian|az:Azerbaijani|eu:Basque|be:Belarusian|bg:Bulgarian|ca:Catalan|zh:Chinese (Simplified)|zh-TW:Chinese (Traditional)|cs:Czech|da:Danish|nl:Dutch|en-GB:English (United Kingdom)|fi:Finnish|fr:French|gl:Galego|de:German|el:Greek|hu:Hungarian|id:Indonesian|it:Italian|ja:Japanese|ko:Korean|lo:Lao|lv:Latvian|ms:Malay (Malaysia)|no:Norwegian|pl:Polish|pt:Portuguese (Brazil)|pt-PT:Portuguese (Portugal)|ro:Romanian|ru:Russian|sr-Cyrl-RS:Serbian (Cyrillic)|sr-Latn-RS:Serbian (Latin)|si:Sinhala (Sri Lanka)|sk:Slovak|sl:Slovenian|es:Spanish|sv:Swedish|tr:Turkish|uk:Ukrainian|vi:Vietnamese|aa-AA:Test Language
spring.datasource.url=jdbc:h2:mem:usersdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password=password spring.jpa.database-platform=org.hibernate.dialect.H2Dialect hibernate.ddl-auto spring.h2.console.enabled=true spring.h2.console.path=/h2 spring.servlet.multipart.max-file-size=5MB spring.servlet.multipart.max-request-size=5MB
url.index=/ url.converter=/converter url.editor=/editor url.track=/track url.download=/download `
I have used Python Example provided in this url "https://api.onlyoffice.com/editors/demopreview". I have change STORAGE_PATH and DOC_SERV_SITE_URL. Config.py
now when i am opening a file or creating new file from document list (document manager). I'm getting error as "The document could not be saved". and followed by "Download Failed". The url showing when opening a new is "http://localhost:8000/edit?filename=new.docx"
where to run python i give cmd as
python3 manage.py runserver 0.0.0.0:8000
this is my out.log