Frappe App for integrating with cloud storage applications
See the installation guides for detailed instructions for either a production or development environment.
MIT
S3 protocol storage for Frappe Applications - compatible with S3, Backblaze and DO Spaces
Home Page: https://agritheory.com/documentation/cloud_storage
License: Other
Frappe App for integrating with cloud storage applications
See the installation guides for detailed instructions for either a production or development environment.
MIT
Move test dependencies to dev dependencies section
[replace this block with a checklist of changes collected in test_utils]
Goal: Allow version control of files using Frappe and a cloud storage platform
Variables:
1. New filename, new hash
2. Existing filename, new hash
3&4. New/existing filename, existing hash
5. Rename file
https://github.com/hujiulong/vue-3d-model
We should be able to support all of these file types: dae, fbx, gltf, obj, ply, stl
Allow logged in users and/or sharing link/token pair to file drop via portal - needs to be configurable
Hello, You mention the permissions and state that they are in the configuration.md doc, but there are no permissions there.
Document sharing link feature in File doctype
version-14
branch failed. π¨I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. Iβm sure you can fix this πͺ.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the version-14
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here are some links that can help you:
If those donβt help, or if this issue is reporting something you think isnβt right, you can always ask the humans behind semantic-release.
An npm token must be created and set in the NPM_TOKEN
environment variable on your CI environment.
Please make sure to create an npm token and to set it in the NPM_TOKEN
environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/
.
Good luck with your project β¨
Your semantic-release bot π¦π
Is user directly tries to upload the File without being attached to any doctype, then it gives error Stack Trace -
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 97, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 55, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 48, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1619, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/handler.py", line 229, in upload_file
return frappe.get_doc(
File "apps/frappe/frappe/model/document.py", line 310, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 332, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 259, in insert
self.run_method("before_insert")
File "apps/frappe/frappe/model/document.py", line 931, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1283, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1265, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 928, in fn
return method_object(*args, **kwargs)
File "apps/frappe/frappe/core/doctype/file/file.py", line 72, in before_insert
self.save_file(content=self.get_content())
File "apps/frappe/frappe/core/doctype/file/file.py", line 604, in save_file
return write_file_method(self)
File "apps/cloud_storage/cloud_storage/cloud_storage/overrides/file.py", line 490, in write_file
return upload_file(file)
File "apps/cloud_storage/cloud_storage/cloud_storage/overrides/file.py", line 407, in upload_file
path = get_file_path(file, client.folder)
File "apps/cloud_storage/cloud_storage/cloud_storage/overrides/file.py", line 430, in get_file_path
file.attached_to_name.replace("#", "%23"),
AttributeError: 'NoneType' object has no attribute 'replace'
As the file is not attached to document and it tries to do file.attached_to_name.replace("#", "%23")
There's a compelling case to be made that the File preview features of Cloud Storage are good even without the remote file storage. To ensure that this feature works correctly, it would be appropriate that we have a test that all these features work without setting any of the frappe.conf
settings.
Shared With case:
We want to add another if block here to check if the file itself has been shared with anyone and to validate that with frappe.session.user
.
Folder Shared With case:
Check if the parent folder has been explicitly shared with frappe.session.user. If there are no shared_with
users, recursively check the parent folder until a shared_with
value is found, and if frappe.session.user
is present, otherwise deny.
For a ready to publish app, we want to have ready
CustomFile => CloudStorageFile
The time expiry feature should be configurable
# hooks.py
override_whitelisted_methods = {
"share": "cloud_storage.cloud_storage.overrides.file.share?key={path}",
"retrieve": "cloud_storage.cloud_storage.overrides.file.retrieve?key={path}",
}
The use case for making a date/doctype/docname flavor of S3 path has multiple issues:
Switch to using the name
of the File record
Allow configuration of file path with a hookable function in case there's a customer reason to customize this (for example an FTP integration)
Traceback:
If you test sending emails with an attachment, you get the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/api/method/retrieve?key=attachments-new/Task/20230410 PO Report/xzCckWS.png'
File "frappe/utils/background_jobs.py", line 160, in execute_job
method(**kwargs)
File "frappe/email/doctype/email_queue/email_queue.py", line 183, in send_mail
record.send(is_background_task=is_background_task, smtp_server_instance=smtp_server_instance)
File "frappe/email/doctype/email_queue/email_queue.py", line 134, in send
message = ctx.build_message(recipient.recipient)
File "frappe/email/doctype/email_queue/email_queue.py", line 293, in build_message
message = self.include_attachments(message)
File "frappe/email/doctype/email_queue/email_queue.py", line 348, in include_attachments
fcontent = _file.get_content()
File "frappe/core/doctype/file/file.py", line 441, in get_content
with open(file_path, mode="rb") as f:
Context:
Initially, attachments can be viewed normally by clicking on their links in the top-left Attachments section.
After trying to send one of them via email, clicking on the attachment link again generates this error:
Using a separate API, generate a sharing link for files, that subsequently calls the retrieve API.
Rendering this as PDF in memory and serving that file for preview is likely an acceptable strategy
Refactor the Frappe-style test to pytest
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.